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,78 +147,96 @@ task deobfJar(type: Jar) {
} }
artifacts { artifacts {
archives sourcesJar archives sourceJar
archives deobfJar archives deobfJar
} }
curse {
dependsOn "createCurseChangelog"
projectId = project.config.curse_project_id
apiKey = "$System.env.curse_api_key"
changelog = curseChangelog
releaseType = project.config.curse_release_type
additionalArtifact deobfJar
additionalArtifact sourceJar
}
uploadArchives { uploadArchives {
dependsOn 'build' dependsOn 'reobf'
repositories.mavenDeployer { repositories {
if ("$System.env.maven_username" != "null" && "$System.env.maven_password" != "null") { if ("$System.env.maven_username" != "null" && "$System.env.maven_password" != "null") {
logger.info('Publishing to files server') logger.info('Publishing to files server')
repository(url: "http://files.minecraftforge.net/maven/manage/upload") { mavenDeployer {
authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password") 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