2016-07-19 19:06:48 +02:00
|
|
|
|
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2016-07-19 19:06:48 +02:00
|
|
|
jcenter()
|
2015-07-12 02:06:16 +02:00
|
|
|
maven {
|
|
|
|
name = "forge"
|
2019-12-21 20:39:14 +01:00
|
|
|
url = "https://files.minecraftforge.net/maven"
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
url "https://plugins.gradle.org/m2/"
|
2015-07-12 02:06:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
2020-02-12 16:38:01 +01:00
|
|
|
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
|
|
|
|
classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.1.2"
|
2020-03-23 22:32:52 +01:00
|
|
|
classpath "com.wynprice.cursemaven:CurseMaven:1.2.3"
|
2015-07-12 02:06:16 +02:00
|
|
|
}
|
|
|
|
}
|
2020-02-12 16:38:01 +01:00
|
|
|
apply plugin: "net.minecraftforge.gradle.forge"
|
|
|
|
apply plugin: "com.matthewprenger.cursegradle"
|
2020-03-23 22:32:52 +01:00
|
|
|
apply plugin: "com.wynprice.cursemaven"
|
2015-07-12 02:06:16 +02:00
|
|
|
|
2016-02-07 23:39:03 +01:00
|
|
|
// define the properties file
|
|
|
|
ext.configFile = file "build.properties"
|
|
|
|
|
|
|
|
configFile.withReader {
|
|
|
|
// read config. it shall from now on be referenced as simply config or as project.config
|
|
|
|
def prop = new Properties()
|
|
|
|
prop.load(it)
|
|
|
|
ext.config = new ConfigSlurper().parse prop
|
|
|
|
}
|
|
|
|
|
2015-08-08 15:46:59 +02:00
|
|
|
group = "cr0s.warpdrive" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
2019-06-10 22:30:11 +02:00
|
|
|
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv("BUILD_NUMBER") ?: 'SNAPSHOT'}"
|
2015-08-28 12:17:34 +02:00
|
|
|
archivesBaseName = "WarpDrive"
|
2015-07-12 02:06:16 +02:00
|
|
|
|
2016-05-23 22:54:36 +02:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
2015-08-31 00:19:44 +02:00
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
minecraft {
|
2016-02-07 23:39:03 +01:00
|
|
|
version = config.minecraft_version + "-" + config.forge_version
|
2017-07-01 17:19:07 +02:00
|
|
|
runDir = "run"
|
2017-05-20 12:23:27 +02:00
|
|
|
|
2016-07-19 19:06:48 +02:00
|
|
|
// the mappings can be changed at any time, and must be in the following format.
|
|
|
|
// snapshot_YYYYMMDD snapshot are built nightly.
|
|
|
|
// stable_# stables are built at the discretion of the MCP team.
|
|
|
|
// Use non-default mappings at your own risk. they may not allways work.
|
|
|
|
// simply re-run your setup task after changing the mappings to update your workspace.
|
2018-07-29 14:46:10 +02:00
|
|
|
mappings = "${config.mappings_version}"
|
2016-07-19 19:06:48 +02:00
|
|
|
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
2018-07-29 14:46:10 +02:00
|
|
|
|
2015-08-08 15:46:59 +02:00
|
|
|
// replacing
|
|
|
|
replace "@version@", project.version
|
|
|
|
replaceIn "WarpDrive.java"
|
2015-08-14 03:58:28 +02:00
|
|
|
replaceIn "MyDummyModContainer.java"
|
2015-07-12 02:06:16 +02:00
|
|
|
}
|
|
|
|
|
2019-12-21 20:39:14 +01:00
|
|
|
curseforge {
|
2020-02-12 16:38:01 +01:00
|
|
|
// get token from gradle.properties (development space) or default to private environment variable (Travis CI & such)
|
2019-12-25 03:19:36 +01:00
|
|
|
if (project.hasProperty('token_curseforge')) {
|
|
|
|
apiKey = "${token_curseforge}"
|
|
|
|
} else {
|
|
|
|
apiKey = System.getenv('token_curseforge')
|
|
|
|
}
|
2019-12-21 20:39:14 +01:00
|
|
|
}
|
|
|
|
|
2016-12-03 13:32:48 +01:00
|
|
|
repositories {
|
2020-02-12 16:38:01 +01:00
|
|
|
mavenCentral()
|
2019-12-25 03:19:36 +01:00
|
|
|
maven { // JEI & Tinkers
|
|
|
|
name 'DVS1 Maven FS'
|
|
|
|
url 'http://dvs1.progwml6.com/files/maven'
|
|
|
|
}
|
2019-12-21 20:39:14 +01:00
|
|
|
maven { // JEI fallback
|
|
|
|
name = "ModMaven"
|
|
|
|
url = "https://modmaven.k-4u.nl"
|
2016-12-03 13:32:48 +01:00
|
|
|
}
|
2018-07-29 14:46:10 +02:00
|
|
|
maven { // CCC/NEI (for WAILA)
|
|
|
|
name 'CB Repo'
|
|
|
|
url "http://chickenbones.net/maven/"
|
|
|
|
}
|
2016-12-03 13:32:48 +01:00
|
|
|
maven { // WAILA
|
|
|
|
name "ProfMobius Maven FS"
|
|
|
|
url "http://mobiusstrip.eu/maven"
|
|
|
|
}
|
|
|
|
maven { // OpenComputers
|
|
|
|
name "OpenComputers"
|
|
|
|
url "http://maven.cil.li/"
|
|
|
|
}
|
|
|
|
maven { // TOP
|
|
|
|
name 'tterrag maven'
|
|
|
|
url "http://maven.tterrag.com/"
|
|
|
|
}
|
2020-03-14 15:19:17 +01:00
|
|
|
maven { // CraftTweaker (aka MineTweaker3), Immersive Engineering, Patchouli
|
2016-12-03 13:32:48 +01:00
|
|
|
name 'jared maven'
|
|
|
|
url "http://blamejared.com/maven"
|
|
|
|
}
|
2016-12-03 16:37:57 +01:00
|
|
|
maven { // MCMultiPart
|
|
|
|
name 'amadornes maven'
|
|
|
|
url "http://maven.amadornes.com/"
|
|
|
|
}
|
2018-06-09 20:55:37 +02:00
|
|
|
maven {
|
|
|
|
name = "CoFH Maven"
|
|
|
|
url = "http://maven.covers1624.net"
|
|
|
|
}
|
2020-03-23 22:32:52 +01:00
|
|
|
// maven {
|
|
|
|
// name = "dmod's BuildBroken maven"
|
|
|
|
// url = "http://api.dmodoomsirius.me"
|
|
|
|
// }
|
2019-12-21 20:39:14 +01:00
|
|
|
maven {
|
|
|
|
name = "CurseForge"
|
|
|
|
url = "https://minecraft.curseforge.com/api/maven/"
|
2018-07-29 14:46:10 +02:00
|
|
|
}
|
2020-06-29 22:20:45 +02:00
|
|
|
ivy {
|
|
|
|
name "GalacticraftCore"
|
|
|
|
url "https://micdoodle8.com/new-builds/"
|
|
|
|
layout 'pattern', {
|
|
|
|
artifact "[organization]/${config.Galacticraft_build}/[module]-[revision].jar"
|
|
|
|
}
|
|
|
|
metadataSources {
|
|
|
|
artifact()
|
|
|
|
}
|
|
|
|
}
|
2020-06-23 23:36:35 +02:00
|
|
|
// mavenLocal()
|
2016-12-03 13:32:48 +01:00
|
|
|
}
|
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
dependencies {
|
|
|
|
// you may put jars on which you depend on in ./libs
|
|
|
|
// or you may define them like so..
|
|
|
|
//compile "some.group:artifact:version:classifier"
|
|
|
|
//compile "some.group:artifact:version"
|
2017-05-12 20:42:44 +02:00
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
// real examples
|
|
|
|
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
|
|
|
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
2017-05-20 12:23:27 +02:00
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
// for more info...
|
|
|
|
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
|
|
|
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
2018-07-29 14:46:10 +02:00
|
|
|
|
|
|
|
// using deobfCompile will include in run environment
|
2019-08-08 11:04:29 +02:00
|
|
|
provided "blusunrize:ImmersiveEngineering:${config.ImmersiveEngineering_version}:deobf"
|
|
|
|
provided "cofh:CoFHCore:${config.CoFHCore_version}:universal"
|
|
|
|
provided "cofh:RedstoneFlux:${config.RedstoneFlux_version}:universal"
|
|
|
|
provided "codechicken:CodeChickenLib:${config.CodeChickenLib_version}:universal"
|
2020-06-29 22:20:45 +02:00
|
|
|
provided "GC-1.12-dev:GalacticraftCore-Dev:${config.Galacticraft_version}.${config.Galacticraft_build}"
|
2020-03-23 22:32:52 +01:00
|
|
|
// provided "com.builtbroken.icbm-classic:ICBM-classic:${config.ICBMclassic_version}"
|
|
|
|
provided curse.resolve("icbm-classic", "${config.ICBMclassic_fileid}")
|
2019-08-08 11:04:29 +02:00
|
|
|
provided "li.cil.oc:OpenComputers:${config.OpenComputers_version}"
|
2020-03-14 15:19:17 +01:00
|
|
|
provided "vazkii.patchouli:Patchouli:${config.Patchouli_version}"
|
2020-05-08 01:45:27 +02:00
|
|
|
provided curse.resolve("matteroverdrive", "${config.MatterOverdrive_fileid}") // "${config.MatterOverdrive_version}"
|
2020-02-12 16:38:01 +01:00
|
|
|
|
2016-12-03 16:37:57 +01:00
|
|
|
// compileOnly "mezz.jei:jei_1.10.2:3.13.+"
|
|
|
|
// compileOnly "mcp.mobius.waila:Waila:1.7.0-B3_1.9.4"
|
|
|
|
// compileOnly "mcjty.theoneprobe:TheOneProbe:1.10-1.0.13-26"
|
|
|
|
// compileOnly "MineTweaker3:MineTweaker3-API:3.0.14.59"
|
2018-07-29 14:46:10 +02:00
|
|
|
// compileOnly "MCMultiPart2:MCMultiPart-exp:2.5.1+"
|
|
|
|
// compileOnly "slimeknights.mantle:Mantle:1.10.2-1.+"
|
|
|
|
// compileOnly "slimeknights:TConstruct:1.10.2-2.5.6.+"
|
2015-07-12 02:06:16 +02:00
|
|
|
}
|
|
|
|
|
2017-05-12 20:42:44 +02:00
|
|
|
processResources {
|
2015-07-12 02:06:16 +02:00
|
|
|
// this will ensure that this task is redone when the versions change.
|
|
|
|
inputs.property "version", project.version
|
|
|
|
inputs.property "mcversion", project.minecraft.version
|
2017-05-20 12:23:27 +02:00
|
|
|
|
|
|
|
// skip source assets
|
2016-02-07 23:39:03 +01:00
|
|
|
exclude '**/*.pdn'
|
|
|
|
exclude '**/*.psd'
|
2017-05-12 20:42:44 +02:00
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
include 'mcmod.info'
|
2016-02-07 23:39:03 +01:00
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
// replace version and mcversion
|
|
|
|
expand 'version':project.version, 'mcversion':project.minecraft.version
|
|
|
|
}
|
2017-05-12 20:42:44 +02:00
|
|
|
|
2015-07-12 02:06:16 +02:00
|
|
|
// copy everything else, thats not the mcmod.info
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude 'mcmod.info'
|
|
|
|
}
|
|
|
|
}
|
2015-08-14 03:58:28 +02:00
|
|
|
|
2018-07-29 14:46:10 +02:00
|
|
|
// build the storage space for each computer scripts
|
|
|
|
task copyShipControllerCommons1(type: Copy) {
|
|
|
|
from 'src/main/resources/assets/warpdrive/lua.ComputerCraft/warpdriveShipController'
|
|
|
|
into('build/resources/main/assets/warpdrive/lua.ComputerCraft/warpdriveShipCore')
|
2017-05-12 20:42:44 +02:00
|
|
|
}
|
2018-07-29 14:46:10 +02:00
|
|
|
task copyShipControllerCommons2(type: Copy) {
|
|
|
|
from 'src/main/resources/assets/warpdrive/lua.OpenComputers/warpdriveShipController'
|
|
|
|
into('build/resources/main/assets/warpdrive/lua.OpenComputers/warpdriveShipCore')
|
2017-05-12 20:42:44 +02:00
|
|
|
}
|
2018-07-29 14:46:10 +02:00
|
|
|
|
2018-09-23 20:07:05 +02:00
|
|
|
task copyOpenComputersCommons1(type: Copy) {
|
2017-05-12 20:42:44 +02:00
|
|
|
from 'src/main/resources/assets/warpdrive/lua.OpenComputers/common'
|
2018-07-29 14:46:10 +02:00
|
|
|
into('build/resources/main/assets/warpdrive/lua.OpenComputers/warpdriveAccelerator')
|
2018-09-23 20:07:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task copyOpenComputersCommons2(type: Copy) {
|
|
|
|
from 'src/main/resources/assets/warpdrive/lua.OpenComputers/common'
|
2018-07-29 14:46:10 +02:00
|
|
|
into('build/resources/main/assets/warpdrive/lua.OpenComputers/warpdriveEnanReactorCore')
|
2018-09-23 20:07:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task copyOpenComputersCommons3(type: Copy) {
|
|
|
|
from 'src/main/resources/assets/warpdrive/lua.OpenComputers/common'
|
2018-04-29 17:34:37 +02:00
|
|
|
into('build/resources/main/assets/warpdrive/lua.OpenComputers/warpdriveShipController')
|
2018-09-23 20:07:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task copyOpenComputersCommons4(type: Copy) {
|
|
|
|
from 'src/main/resources/assets/warpdrive/lua.OpenComputers/common'
|
2018-07-29 14:46:10 +02:00
|
|
|
into('build/resources/main/assets/warpdrive/lua.OpenComputers/warpdriveShipCore')
|
2018-09-23 20:07:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task copyOpenComputersCommons5(type: Copy) {
|
|
|
|
from 'src/main/resources/assets/warpdrive/lua.OpenComputers/common'
|
2018-04-29 17:34:37 +02:00
|
|
|
into('build/resources/main/assets/warpdrive/lua.OpenComputers/warpdriveTransporterCore')
|
2018-09-23 20:07:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
task copyOpenComputersCommons6(type: Copy) {
|
|
|
|
from 'src/main/resources/assets/warpdrive/lua.OpenComputers/common'
|
2018-04-29 17:34:37 +02:00
|
|
|
into('build/resources/main/assets/warpdrive/lua.OpenComputers/warpdriveWeaponController')
|
2017-05-12 20:42:44 +02:00
|
|
|
}
|
|
|
|
|
2015-08-14 03:58:28 +02:00
|
|
|
jar {
|
2018-07-29 14:46:10 +02:00
|
|
|
dependsOn copyShipControllerCommons1, copyShipControllerCommons2
|
2018-09-23 20:07:05 +02:00
|
|
|
dependsOn copyOpenComputersCommons1, copyOpenComputersCommons2, copyOpenComputersCommons3, copyOpenComputersCommons4, copyOpenComputersCommons5, copyOpenComputersCommons6
|
2017-05-12 20:42:44 +02:00
|
|
|
|
2016-02-07 23:39:03 +01:00
|
|
|
manifest {
|
2017-03-12 16:53:00 +01:00
|
|
|
attributes FMLAT: "warpdrive_at.cfg"
|
2016-08-13 18:47:26 +02:00
|
|
|
attributes FMLCorePlugin: "cr0s.warpdrive.core.FMLLoadingPlugin"
|
|
|
|
attributes FMLCorePluginContainsFMLMod: "true"
|
2015-08-14 03:58:28 +02:00
|
|
|
}
|
2017-07-01 17:19:07 +02:00
|
|
|
classifier = ''
|
|
|
|
destinationDir = file 'output'
|
2016-05-16 05:56:04 +02:00
|
|
|
}
|
|
|
|
|
2018-07-01 04:04:56 +02:00
|
|
|
task signJar(type: SignJar) {
|
|
|
|
onlyIf { // Skip the task if our secret data isn't available
|
|
|
|
project.hasProperty('keyStore')
|
|
|
|
}
|
|
|
|
dependsOn reobfJar
|
|
|
|
|
|
|
|
if (project.hasProperty('keyStore')) { // This needs to be a path to the keystore file
|
|
|
|
keyStore = project.keyStore
|
|
|
|
alias = project.alias
|
|
|
|
storePass = project.storePass
|
|
|
|
keyPass = project.keyPass
|
|
|
|
inputFile = jar.archivePath
|
|
|
|
outputFile = jar.archivePath
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
build.dependsOn signJar
|
|
|
|
|
2016-05-16 05:56:04 +02:00
|
|
|
idea {
|
|
|
|
module {
|
|
|
|
inheritOutputDirs = true
|
|
|
|
}
|
2016-05-23 22:54:36 +02:00
|
|
|
}
|
2017-04-14 01:50:11 +02:00
|
|
|
|
|
|
|
runClient {
|
2017-08-14 16:12:25 +02:00
|
|
|
jvmArgs "-Xmx2048m", "-Xms1024m", "-ea"
|
2017-04-14 01:50:11 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
runServer {
|
2017-08-14 16:12:25 +02:00
|
|
|
jvmArgs "-Xmx2048m", "-Xms1024m", "-ea"
|
2017-04-14 01:50:11 +02:00
|
|
|
}
|