Reverted back to an older Forge/ForgeGradle to hopefully resolve build issues
This commit is contained in:
parent
c5a85f8e11
commit
0167c14972
5 changed files with 237 additions and 173 deletions
116
build.gradle
116
build.gradle
|
@ -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,25 +147,34 @@ task deobfJar(type: Jar) {
|
||||||
}
|
}
|
||||||
|
|
||||||
artifacts {
|
artifacts {
|
||||||
archives sourcesJar
|
archives sourceJar
|
||||||
archives deobfJar
|
archives deobfJar
|
||||||
}
|
}
|
||||||
|
|
||||||
uploadArchives {
|
curse {
|
||||||
dependsOn 'build'
|
dependsOn "createCurseChangelog"
|
||||||
|
|
||||||
repositories.mavenDeployer {
|
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 {
|
||||||
|
dependsOn 'reobf'
|
||||||
|
|
||||||
|
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
|
||||||
}
|
|
||||||
} else {
|
|
||||||
logger.info('Publishing to repo folder')
|
|
||||||
|
|
||||||
pom.version = "${project.minecraft.version}-${project.version}"
|
repository(url: project.filesmaven.url) {
|
||||||
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
authentication(userName: "$System.env.maven_username", privateKey: "$System.env.maven_password")
|
||||||
}
|
}
|
||||||
|
|
||||||
pom {
|
pom {
|
||||||
|
@ -176,4 +231,13 @@ uploadArchives {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
logger.info('Publishing to repo folder')
|
||||||
|
|
||||||
|
mavenDeployer {
|
||||||
|
pom.version = "${project.minecraft.version}-${project.version}"
|
||||||
|
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -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
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue