Update to gradlewrapper 2.7, and refresh build.gradle for FG 2.1

This commit is contained in:
cpw 2015-11-22 23:59:04 -05:00
parent a4bee7ff6f
commit 2b67783cef
3 changed files with 56 additions and 96 deletions

View File

@ -1,24 +1,20 @@
// This sets us up for building a forge project - you need all of these // This sets us up for building a forge project - you need all of these
buildscript { buildscript {
repositories { repositories {
mavenCentral() jcenter()
maven { maven {
name = "forge" name = "forge"
url = "http://files.minecraftforge.net/maven" url = "http://files.minecraftforge.net/maven"
} }
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge'
// Apply the forge plugin - this adds all the magic for automatically obfuscating, deobfuscating etc apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'forge' apply plugin: 'idea'
// This is a simple flatdir repository for "uploadArchives" when you don't have a remote repo to target // This is a simple flatdir repository for "uploadArchives" when you don't have a remote repo to target
repositories { repositories {
@ -38,7 +34,7 @@ archivesBaseName = "ironchest"
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here // Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
minecraft { minecraft {
version = "1.8-11.14.0.1292-1.8" version = "1.8.8-11.14.4.1575-1.8.8"
mappings = "snapshot_20150129" mappings = "snapshot_20150129"
} }
@ -70,97 +66,61 @@ processResources
} }
} }
// this sets our output jar to have a 'tag' of 'universal' on it
// It also adds the minecraft version in a custom version name
// The result is files named <projectname>-<mcversion>-<version>-universal.jar
jar {
classifier = 'universal'
version = "${project.minecraft.version}-${project.version}"
}
println "FISHBUM ${jar.version}"
// Add in a source jar for people, should they desire to download such a thing
task sourceJar(type: Jar) {
from sourceSets.main.allSource
classifier = 'src'
version = "${project.minecraft.version}-${project.version}"
}
// Add in an mcp named jar, for those who wish to run in a development environment (assuming mcp naming matches)
task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'deobf'
version = "${project.minecraft.version}-${project.version}"
}
// Tell the artifact system about our extra jars
artifacts {
archives sourceJar, deobfJar
}
// Configure an upload task. this is setup for uploading to files.minecraftforge.net. There are other examples around // Configure an upload task. this is setup for uploading to files.minecraftforge.net. There are other examples around
uploadArchives { uploadArchives {
dependsOn 'reobf' repositories.mavenDeployer {
repositories {
if (project.hasProperty("filesmaven")) {
logger.info('Publishing to files server')
mavenDeployer { dependsOn 'build'
configuration = configurations.deployJars
repository(url: project.filesmaven.url) { if (project.hasProperty('forgeMavenPass'))
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key) {
repository(url: "http://files.minecraftforge.net/maven/manage/upload") {
authentication(userName: "forge", password: project.getProperty('forgeMavenPass')) // the elvis operator. look it up.
}
}
else
{
// local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}
// This is just the pom data for the maven repo
pom {
groupId = project.group
// Force the maven upload to use the <mcversion>-<version> syntax preferred at files
version = "${project.minecraft.version}-${project.version}"
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'IronChest'
url 'https://github.com/cpw/IronChest'
scm {
url 'https://github.com/progwml6/IronChest'
connection 'scm:git:git://github.com/progwml6/IronChest.git'
developerConnection 'scm:git:git@github.com:progwml6/IronChest.git'
} }
// This is just the pom data for the maven repo issueManagement {
pom { system 'github'
groupId = project.group url 'https://github.com/progwml6/IronChest/issues'
// Force the maven upload to use the <mcversion>-<version> syntax preferred at files }
version = "${project.minecraft.version}-${project.version}"
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'IronChest'
url 'https://github.com/cpw/IronChest'
scm { licenses {
url 'https://github.com/progwml6/IronChest' license {
connection 'scm:git:git://github.com/progwml6/IronChest.git' name 'GNU Public License (GPL), Version 3.0'
developerConnection 'scm:git:git@github.com:progwml6/IronChest.git' url 'http://www.gnu.org/licenses/gpl-3.0.txt'
} distribution 'repo'
issueManagement {
system 'github'
url 'https://github.com/progwml6/IronChest/issues'
}
licenses {
license {
name 'GNU Public License (GPL), Version 3.0'
url 'http://www.gnu.org/licenses/gpl-3.0.txt'
distribution 'repo'
}
}
developers {
developer {
id 'cpw'
name 'cpw'
roles { role 'developer' }
}
}
} }
} }
}
} else {
logger.info('Publishing to repo folder')
mavenDeployer { developers {
pom.version = "${project.minecraft.version}-${project.version}" developer {
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) id 'cpw'
name 'cpw'
roles { role 'developer' }
}
}
} }
} }
} }

Binary file not shown.

View File

@ -1,6 +1,6 @@
#Wed Sep 10 01:32:34 EDT 2014 #Sun Nov 22 23:58:08 EST 2015
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip