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
buildscript {
repositories {
mavenCentral()
jcenter()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
}
}
// Apply the forge plugin - this adds all the magic for automatically obfuscating, deobfuscating etc
apply plugin: 'forge'
apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'idea'
// This is a simple flatdir repository for "uploadArchives" when you don't have a remote repo to target
repositories {
@ -38,7 +34,7 @@ archivesBaseName = "ironchest"
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
minecraft {
version = "1.8-11.14.0.1292-1.8"
version = "1.8.8-11.14.4.1575-1.8.8"
mappings = "snapshot_20150129"
}
@ -70,50 +66,23 @@ 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
uploadArchives {
dependsOn 'reobf'
repositories {
if (project.hasProperty("filesmaven")) {
logger.info('Publishing to files server')
repositories.mavenDeployer {
mavenDeployer {
configuration = configurations.deployJars
dependsOn 'build'
repository(url: project.filesmaven.url) {
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
if (project.hasProperty('forgeMavenPass'))
{
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
@ -155,15 +124,6 @@ uploadArchives {
}
}
}
} else {
logger.info('Publishing to repo folder')
mavenDeployer {
pom.version = "${project.minecraft.version}-${project.version}"
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
}
}
}
}
// This is a special task for pulling the version information from git and the environment (for BUILD_NUMBER)

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
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
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