Attempted to update Gradle and Forge. Expect stuff to break.
This commit is contained in:
parent
a11c252a6c
commit
d357d539ef
4 changed files with 82 additions and 141 deletions
217
build.gradle
217
build.gradle
|
@ -1,22 +1,8 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
name = 'sonatype-nexus-public'
|
||||
url = 'https://oss.sonatype.org/content/repositories/public/'
|
||||
}
|
||||
maven {
|
||||
name = 'forge-repo'
|
||||
url = 'http://files.minecraftforge.net/maven/'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: "forge"
|
||||
apply plugin: "curseforge"
|
||||
plugins {
|
||||
id "net.minecraftforge.gradle.forge" version "2.0.1"
|
||||
}
|
||||
|
||||
apply plugin: "maven"
|
||||
|
||||
repositories {
|
||||
flatDir {
|
||||
|
@ -47,10 +33,6 @@ minecraft {
|
|||
// add some stuff to the version
|
||||
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' ]
|
||||
|
@ -90,47 +72,24 @@ processResources {
|
|||
}
|
||||
}
|
||||
|
||||
import net.minecraftforge.gradle.tasks.dev.ChangelogTask
|
||||
import net.minecraftforge.gradle.tasks.JenkinsChangelog
|
||||
import net.minecraftforge.gradle.common.Constants
|
||||
import net.minecraftforge.gradle.delayed.*
|
||||
|
||||
task createChangelog(type: ChangelogTask) {
|
||||
task createChangelog(type: JenkinsChangelog) {
|
||||
def jobName = "${System.getenv().JOB_NAME}"
|
||||
def buildNumber = "${System.getenv().BUILD_NUMBER}"
|
||||
|
||||
setServerRoot(new DelayedString(project, 'http://ci.jenkins.minecraftforge.net/'))
|
||||
setJobName(new DelayedString(project, jobName.toString()));
|
||||
setAuthName(new DelayedString(project, 'console_script'));
|
||||
setAuthPassword(new DelayedString(project, 'dc6d48ca20a474beeac280a9a16a926e'));
|
||||
setTargetBuild({buildNumber.toString()});
|
||||
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'
|
||||
}
|
||||
}
|
||||
serverRoot = 'http://ci.jenkins.minecraftforge.net/'
|
||||
jobName = jobName.toString();
|
||||
authName = 'console_script';
|
||||
authPassword = 'dc6d48ca20a474beeac280a9a16a926e';
|
||||
targetBuild = buildNumber.toString();
|
||||
output = 'build/libs/' + project.getName() + '-' + project.version + '-changelog.txt';
|
||||
}
|
||||
|
||||
tasks.build.dependsOn('createChangelog')
|
||||
|
||||
task sourceJar(type: Jar) {
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allJava
|
||||
from (sourceSets.main.output) {
|
||||
include 'LICENSE.txt'
|
||||
|
@ -147,96 +106,78 @@ task deobfJar(type: Jar) {
|
|||
}
|
||||
|
||||
artifacts {
|
||||
archives sourceJar
|
||||
archives sourcesJar
|
||||
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 {
|
||||
dependsOn 'reobf'
|
||||
repositories {
|
||||
if (project.hasProperty("filesmaven")) {
|
||||
logger.info('Publishing to files server')
|
||||
|
||||
mavenDeployer {
|
||||
configuration = configurations.deployJars
|
||||
|
||||
repository(url: project.filesmaven.url) {
|
||||
authentication(userName: project.filesmaven.username, privateKey: project.filesmaven.key)
|
||||
dependsOn 'build'
|
||||
repositories.mavenDeployer {
|
||||
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())
|
||||
}
|
||||
|
||||
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'
|
||||
}
|
||||
|
||||
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' }
|
||||
}
|
||||
}
|
||||
|
||||
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 {
|
||||
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
|
||||
forge_version=11.14.3.1468
|
||||
forge_version=11.14.3.1514
|
||||
mod_version=3.0.0
|
||||
curse_project_id=220318
|
||||
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 @@
|
|||
#Wed Jul 02 15:54:47 CDT 2014
|
||||
#Mon Sep 14 12:28:28 PDT 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
|
||||
|
|
Loading…
Reference in a new issue