Preliminary gradle fixing. Have I ever mentioned that I think Gradle is rubbish?
This commit is contained in:
parent
58f076007a
commit
57ac719093
5 changed files with 66 additions and 47 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -18,3 +18,4 @@
|
|||
*.ipr
|
||||
*.iws
|
||||
|
||||
*.launch
|
||||
|
|
93
build.gradle
93
build.gradle
|
@ -1,22 +1,22 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.matthewprenger.cursegradle" version "1.0.9"
|
||||
}
|
||||
/*plugins {
|
||||
id "com.matthewprenger.cursegradle" version "1.1.2"
|
||||
}*/
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
// define the properties file
|
||||
ext.configFile = file "build.properties"
|
||||
|
@ -29,26 +29,54 @@ configFile.withReader {
|
|||
}
|
||||
|
||||
group = "com.github.glitchfiend.biomesoplenty"
|
||||
// why set the version twice?
|
||||
version = config.mod_version
|
||||
archivesBaseName = "BiomesOPlenty"
|
||||
|
||||
// add some stuff to the version
|
||||
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}"
|
||||
// set this for the version.properties file, or was this broken on purpose?
|
||||
config.build_number = (System.getenv().BUILD_NUMBER) ? System.getenv().BUILD_NUMBER : ""
|
||||
|
||||
sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
|
||||
compileJava {
|
||||
sourceCompatibility = targetCompatibility = '1.8'
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = config.minecraft_version + "-" + config.forge_version // grab latest forge
|
||||
useDepAts = true
|
||||
mappings = project.config.mappings_version
|
||||
//gradle complains if this isn't set when setting up/using IDEA workspace
|
||||
runDir = "run"
|
||||
//set a full version string with appended build number to be used in mod registration
|
||||
def buildnum = (config.build_number!="") ? '.' + config.build_number : ""
|
||||
replace '@MOD_VERSION@', config.mod_version + buildnum
|
||||
replace '1.0.0.0', config.forge_version
|
||||
replaceIn 'BiomesOPlenty.java'
|
||||
mappings channel: 'snapshot', version: config.mappings_version
|
||||
|
||||
// default run configurations.
|
||||
// these can be tweaked, removed, or duplicated as needed.
|
||||
runConfig {
|
||||
name= "Minecraft Client"
|
||||
main= "net.minecraftforge.userdev.UserdevLauncher"
|
||||
ideaModuleName = "${project.name}_main"
|
||||
workingDirectory = project.file("run").canonicalPath
|
||||
environment "target", "fmluserdevclient"
|
||||
environment "assetDirectory", downloadAssets.output.absolutePath
|
||||
environment "FORGE_VERSION", config.forge_version
|
||||
environment "FORGE_GROUP", config.forge_group
|
||||
environment "MCP_VERSION", config.mappings_version
|
||||
environment "MC_VERSION", config.minecraft_version
|
||||
environment "MOD_CLASSES", "${sourceSets.main.output.resourcesDir}${File.pathSeparator}${sourceSets.main.output.classesDirs.join(File.pathSeparator)}"
|
||||
}
|
||||
|
||||
runConfig {
|
||||
name= "Minecraft Server"
|
||||
main= "net.minecraftforge.userdev.UserdevLauncher"
|
||||
ideaModuleName = "${project.name}_main"
|
||||
workingDirectory = project.file("run").canonicalPath
|
||||
environment "target", "fmluserdevserver"
|
||||
environment "assetDirectory", downloadAssets.output.absolutePath
|
||||
environment "FORGE_VERSION", config.forge_version
|
||||
environment "FORGE_GROUP", config.forge_group
|
||||
environment "MCP_VERSION", config.mappings_version
|
||||
environment "MC_VERSION", config.minecraft_version
|
||||
environment "MOD_CLASSES", "${sourceSets.main.output.resourcesDir}${File.pathSeparator}${sourceSets.main.output.classesDirs.join(File.pathSeparator)}"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge.test:userdev:' + config.minecraft_version + '-' + config.forge_version
|
||||
compile 'net.minecraftforge.test:forge:' + config.minecraft_version + '-' + config.forge_version + ':launcher'
|
||||
}
|
||||
|
||||
def commonManifest = {
|
||||
|
@ -80,22 +108,6 @@ processResources {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
import groovy.io.FileType
|
||||
|
||||
task changelog(type: JenkinsChangelog) {
|
||||
def buildNumber = "${System.getenv().BUILD_NUMBER}"
|
||||
|
||||
serverRoot = 'http://ci.jenkins.minecraftforge.net/'
|
||||
jobName = 'BiomesOPlenty'
|
||||
authName = 'console_script'
|
||||
authPassword = 'dc6d48ca20a474beeac280a9a16a926e'
|
||||
targetBuild = buildNumber.toString()
|
||||
output = 'build/libs/' + project.getName() + '-' + project.version + '-changelog.txt'
|
||||
}
|
||||
|
||||
tasks.build.dependsOn('changelog')
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allJava
|
||||
from (sourceSets.main.output) {
|
||||
|
@ -149,20 +161,19 @@ task listOutputs << {
|
|||
tasks.build.finalizedBy('listOutputs')
|
||||
|
||||
artifacts {
|
||||
archives changelog.output
|
||||
archives sourcesJar
|
||||
archives deobfJar
|
||||
archives apiJar
|
||||
}
|
||||
|
||||
curseforge {
|
||||
/*curseforge {
|
||||
apiKey = "$System.env.curse_api_key"
|
||||
project {
|
||||
id = '220318'
|
||||
changelog = file('build/libs/' + project.getName() + '-' + project.version + '-changelog.txt')
|
||||
releaseType = 'beta'
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
minecraft_version=1.12.2
|
||||
forge_version=14.23.5.2768
|
||||
mod_version=7.0.1
|
||||
mappings_version=snapshot_nodoc_20171031
|
||||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
|
||||
mod_version=8.0.0
|
||||
|
||||
minecraft_version=1.13
|
||||
minecraft_version_toml=13
|
||||
forge_version=24.0.55-1.13-pre
|
||||
forge_version_toml=24
|
||||
forge_group=net.minecraftforge.test
|
||||
mappings_version=20181221-1.13.1
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,5 @@
|
|||
#Thu Nov 17 11:57:30 EST 2016
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
|
||||
|
|
Loading…
Reference in a new issue