Reverted back to an older Forge/ForgeGradle to hopefully resolve build issues

This commit is contained in:
Adubbz 2015-10-01 15:30:18 +10:00
parent c5a85f8e11
commit 0167c14972
5 changed files with 237 additions and 173 deletions

View file

@ -1,18 +1,29 @@
buildscript { buildscript {
repositories { repositories {
jcenter() mavenCentral()
maven { maven {
name = "forge" name = 'sonatype-nexus-public'
url = "http://files.minecraftforge.net/maven" url = 'https://oss.sonatype.org/content/repositories/public/'
}
maven {
name = 'forge-repo'
url = 'http://files.minecraftforge.net/maven/'
} }
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT' classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
} }
} }
apply plugin: 'net.minecraftforge.gradle.forge' apply plugin: "forge"
apply plugin: 'maven' apply plugin: "curseforge"
repositories {
flatDir {
name "fileRepo"
dirs "repo"
}
}
// define the properties file // define the properties file
ext.configFile = file "build.properties" ext.configFile = file "build.properties"
@ -36,6 +47,17 @@ minecraft {
// add some stuff to the version // add some stuff to the version
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}" version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}"
jenkins {
job = 'BiomesOPlenty'
}
// Source compiler configuration
tasks.withType(JavaCompile) {
//options.compilerArgs += [ '-Xlint:all', '-Xlint:-path', '-Xlint:-processing' ]
//options.deprecation = true
options.encoding = 'utf8'
}
def commonManifest = { def commonManifest = {
attributes 'FMLCorePlugin': 'biomesoplenty.common.asm.BOPLoadingPlugin' attributes 'FMLCorePlugin': 'biomesoplenty.common.asm.BOPLoadingPlugin'
attributes 'FMLCorePluginContainsFMLMod': 'true' attributes 'FMLCorePluginContainsFMLMod': 'true'
@ -68,23 +90,47 @@ processResources {
} }
} }
import net.minecraftforge.gradle.tasks.JenkinsChangelog import net.minecraftforge.gradle.tasks.dev.ChangelogTask
import net.minecraftforge.gradle.common.Constants import net.minecraftforge.gradle.common.Constants
import net.minecraftforge.gradle.delayed.*
task createChangelog(type: JenkinsChangelog) { task createChangelog(type: ChangelogTask) {
def jobName = "${System.getenv().JOB_NAME}"
def buildNumber = "${System.getenv().BUILD_NUMBER}" def buildNumber = "${System.getenv().BUILD_NUMBER}"
serverRoot = 'http://ci.jenkins.minecraftforge.net/' setServerRoot(new DelayedString(project, 'http://ci.jenkins.minecraftforge.net/'))
jobName = 'BiomesOPlenty' setJobName(new DelayedString(project, jobName.toString()));
authName = 'console_script'; setAuthName(new DelayedString(project, 'console_script'));
authPassword = 'dc6d48ca20a474beeac280a9a16a926e'; setAuthPassword(new DelayedString(project, 'dc6d48ca20a474beeac280a9a16a926e'));
targetBuild = buildNumber.toString(); setTargetBuild({buildNumber.toString()});
output = 'build/libs/' + project.getName() + '-' + project.version + '-changelog.txt'; setOutput(new DelayedFile(project, 'build/libs/' + project.getName() + '-' + project.version + '-changelog.txt'));
}
def curseChangelog
task createCurseChangelog {
def env = System.getenv()
def jenkinsUrl = env.JENKINS_URL
def jenkinsJob = env.JOB_NAME
def buildNumber = env.BUILD_NUMBER
if (jenkinsUrl != null && jenkinsJob != null && buildNumber != null) {
def auth = "console_script:dc6d48ca20a474beeac280a9a16a926e".getBytes().encodeBase64().toString()
def url = new URL("$jenkinsUrl/job/$jenkinsJob/$buildNumber/api/xml?depth=20").openConnection()
url.setRequestProperty("Authorization", "Basic " + auth)
String data = url.getInputStream().text
def xml = new XmlSlurper().parseText(data)
xml.changeSet.item.each { change ->
curseChangelog += "$change.author.fullName: $change.msg" + '\n'
}
}
} }
tasks.build.dependsOn('createChangelog') tasks.build.dependsOn('createChangelog')
task sourcesJar(type: Jar) { task sourceJar(type: Jar) {
from sourceSets.main.allJava from sourceSets.main.allJava
from (sourceSets.main.output) { from (sourceSets.main.output) {
include 'LICENSE.txt' include 'LICENSE.txt'
@ -101,79 +147,97 @@ task deobfJar(type: Jar) {
} }
artifacts { artifacts {
archives sourcesJar archives sourceJar
archives deobfJar archives deobfJar
} }
uploadArchives { curse {
dependsOn 'build' dependsOn "createCurseChangelog"
repositories.mavenDeployer {
if ("$System.env.maven_username" != "null" && "$System.env.maven_password" != "null") {
logger.info('Publishing to files server')
repository(url: "http://files.minecraftforge.net/maven/manage/upload") { projectId = project.config.curse_project_id
authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password") apiKey = "$System.env.curse_api_key"
changelog = curseChangelog
releaseType = project.config.curse_release_type
additionalArtifact deobfJar
additionalArtifact sourceJar
}
uploadArchives {
dependsOn 'reobf'
repositories {
if ("$System.env.maven_username" != "null" && "$System.env.maven_password" != "null") {
logger.info('Publishing to files server')
mavenDeployer {
configuration = configurations.deployJars
repository(url: project.filesmaven.url) {
authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password")
}
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'Biomes O Plenty'
url 'https://github.com/Glitchfiend/BiomesOPlenty'
scm {
url 'https://github.com/Glitchfiend/BiomesOPlenty'
connection 'scm:git:git://github.com/Glitchfiend/BiomesOPlenty.git'
developerConnection 'scm:git:git@github.com:Glitchfiend/BiomesOPlenty.git'
}
issueManagement {
system 'github'
url 'https://github.com/Glitchfiend/BiomesOPlenty/issues'
}
licenses {
license {
name 'Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International Public License'
url 'http://creativecommons.org/licenses/by-nc-nd/4.0/'
distribution 'repo'
}
}
developers {
developer {
id 'Adubbz'
name 'Adubbz'
roles { role 'developer' }
}
developer {
id 'Amnet'
name 'Amnet'
roles { role 'developer' }
}
developer {
id 'Forstride'
name 'Forstride'
roles { role 'developer' }
}
developer {
id 'ted80'
name 'ted80'
roles { role 'developer' }
}
}
}
}
} }
} else { } else {
logger.info('Publishing to repo folder') logger.info('Publishing to repo folder')
pom.version = "${project.minecraft.version}-${project.version}" mavenDeployer {
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) pom.version = "${project.minecraft.version}-${project.version}"
} repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
pom {
groupId = project.group
version = project.version
artifactId = project.archivesBaseName
project {
name project.archivesBaseName
packaging 'jar'
description 'Biomes O Plenty'
url 'https://github.com/Glitchfiend/BiomesOPlenty'
scm {
url 'https://github.com/Glitchfiend/BiomesOPlenty'
connection 'scm:git:git://github.com/Glitchfiend/BiomesOPlenty.git'
developerConnection 'scm:git:git@github.com:Glitchfiend/BiomesOPlenty.git'
}
issueManagement {
system 'github'
url 'https://github.com/Glitchfiend/BiomesOPlenty/issues'
}
licenses {
license {
name 'Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International Public License'
url 'http://creativecommons.org/licenses/by-nc-nd/4.0/'
distribution 'repo'
}
}
developers {
developer {
id 'Adubbz'
name 'Adubbz'
roles { role 'developer' }
}
developer {
id 'Amnet'
name 'Amnet'
roles { role 'developer' }
}
developer {
id 'Forstride'
name 'Forstride'
roles { role 'developer' }
}
developer {
id 'ted80'
name 'ted80'
roles { role 'developer' }
}
}
} }
} }
} }
} }

View file

@ -1,5 +1,5 @@
minecraft_version=1.8 minecraft_version=1.8
forge_version=11.14.3.1514 forge_version=11.14.3.1502
mod_version=3.0.0 mod_version=3.0.0
curse_project_id=220318 curse_project_id=220318
curse_release_type=alpha curse_release_type=alpha

Binary file not shown.

View file

@ -1,6 +1,6 @@
#Mon Sep 14 12:28:28 PDT 2015 #Wed Jul 02 15:54:47 CDT 2014
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.7-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip

180
gradlew.bat vendored
View file

@ -1,90 +1,90 @@
@if "%DEBUG%" == "" @echo off @if "%DEBUG%" == "" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@rem @rem
@rem ########################################################################## @rem ##########################################################################
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS= set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% set APP_HOME=%DIRNAME%
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if "%ERRORLEVEL%" == "0" goto init
echo. echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:findJavaFromJavaHome :findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto init
echo. echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo. echo.
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation. echo location of your Java installation.
goto fail goto fail
:init :init
@rem Get command-line arguments, handling Windowz variants @rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args if not "%OS%" == "Windows_NT" goto win9xME_args
if "%@eval[2+2]" == "4" goto 4NT_args if "%@eval[2+2]" == "4" goto 4NT_args
:win9xME_args :win9xME_args
@rem Slurp the command line arguments. @rem Slurp the command line arguments.
set CMD_LINE_ARGS= set CMD_LINE_ARGS=
set _SKIP=2 set _SKIP=2
:win9xME_args_slurp :win9xME_args_slurp
if "x%~1" == "x" goto execute if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%* set CMD_LINE_ARGS=%*
goto execute goto execute
:4NT_args :4NT_args
@rem Get arguments from the 4NT Shell from JP Software @rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$ set CMD_LINE_ARGS=%$
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if "%ERRORLEVEL%"=="0" goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1 exit /b 1
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal
:omega :omega