From 4596c26ba6eec8b07b06032849d8b1edd9caa0ac Mon Sep 17 00:00:00 2001 From: bartimaeusnek Date: Mon, 12 Oct 2020 10:35:14 +0200 Subject: UpdatedGradle to 5.6.4 Former-commit-id: 25b98d89c4395cb843b40fd1c3a447f679c89922 --- build.gradle | 192 +++++++++++++++---------------- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 93 insertions(+), 101 deletions(-) diff --git a/build.gradle b/build.gradle index 96e65157ca..9bbee2d10b 100644 --- a/build.gradle +++ b/build.gradle @@ -1,35 +1,3 @@ -buildscript { - repositories { - mavenCentral() - maven { - name = "forge" - url = "http://files.minecraftforge.net/maven" - } - maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/repositories/snapshots/" - } - } - dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' - classpath "de.undercouch:gradle-download-task:3.1.2" - } -} - -plugins { - id "org.sonarqube" version "2.2" -} - -apply plugin: 'forge' -apply plugin: 'signing' -apply plugin: 'idea' -idea{ - module { - downloadJavadoc = true - downloadSources = true - } -} - /* * Copyright (c) 2018-2020 bartimaeusnek * @@ -51,18 +19,39 @@ idea{ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -import de.undercouch.gradle.tasks.download.Download +buildscript { + repositories { + mavenCentral() + maven { + name = "forge" + url = "http://files.minecraftforge.net/maven" + } + maven { + name = "jitpack" + url = "https://jitpack.io" + } + } + dependencies { + classpath "com.github.GTNH2:ForgeGradle:0d2484b" + } +} + +apply plugin: "forge" +apply plugin: "signing" +apply plugin: "idea" +idea{ + module { + downloadJavadoc = true + downloadSources = true + } +} //noinspection GroovyUnusedAssignment sourceCompatibility = JavaVersion.VERSION_1_8 //noinspection GroovyUnusedAssignment targetCompatibility = JavaVersion.VERSION_1_8 -//noinspection GroovyUnusedAssignment -sourceCompatibility = 1.8 -//noinspection GroovyUnusedAssignment -targetCompatibility = 1.8 -compileJava.options.encoding = 'UTF-8' +compileJava.options.encoding = "UTF-8" ext.configFile = file "build.properties" configFile.withReader { @@ -89,71 +78,81 @@ minecraft { repositories { mavenLocal() + maven { + name = "gt" + url = "https://gregtech.overminddl1.com/" + } maven { name = "ic2" url = "http://maven.ic2.player.to/" } - maven { // AppleCore - url "http://www.ryanliptak.com/maven/" - } maven { // GalacticGreg, YAMCore,.. - name 'UsrvDE' + name "UsrvDE" url "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/" } ivy { - name 'gtnh_download_source_stupid_underscore_typo' + name "gtnh_download_source_stupid_underscore_typo" artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]" } ivy { - name 'gtnh_download_source' + name "gtnh_download_source" artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]" } maven { - name = "gt" - url = "https://gregtech.overminddl1.com/" + name = "OC repo" + url = "http://maven.cil.li/" } maven { - url = "http://maven.cil.li/" + name = "jabba" + url = "http://default.mobiusstrip.eu/maven" + } + maven { + name = "chickenbones" + url = "http://chickenbones.net/maven/" + } + maven { + name = "Apple" + url "http://www.ryanliptak.com/maven/" + } + ivy { + name "BuildCraft" + artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]" + } + maven { + name = "jitpack" + url = "https://jitpack.io" } } dependencies { + //hard deps compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev" - compile "micdoodle8.mods:MicdoodleCore:${config.galacticraft.version}:Dev" - compile "micdoodle8.mods:GalacticraftCore:${config.galacticraft.version}:Dev" - compile "micdoodle8.mods:Galacticraft-Planets:${config.galacticraft.version}:Dev" - compile "li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api" + //compile "com.github.GTNH2:GT5-Unofficial:experimental-SNAPSHOT:dev" //broken jitpack.io dep + //soft deps + compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf" + compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev" + compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev" + compileOnly "micdoodle8.mods:MicdoodleCore:${config.galacticraft.version}:Dev" + compileOnly "micdoodle8.mods:GalacticraftCore:${config.galacticraft.version}:Dev" + compileOnly "micdoodle8.mods:Galacticraft-Planets:${config.galacticraft.version}:Dev" + compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api" + compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev" + compileOnly "com.github.GTNewHorizons:GalacticGregGT5:master-SNAPSHOT" + compileOnly fileTree(dir: "libs", include: "*.jar") + + //CoreLibs for compile-age + //compileOnly "com.github.GTNH2:Yamcl:master-SNAPSHOT" //broken jitpack.io dep compileOnly "applecore:AppleCore:${config.applecore.version}:api" compileOnly "com.enderio.core:EnderCore:${config.enderiocore.version}:dev" compileOnly "com.enderio:EnderIO:${config.enderio.version}:dev" compileOnly "com.enderio:EnderIO:${config.enderio.version}:dev" -} -task getRailCraft(type: Download) { - onlyIf { - !file("libs/Railcraft_1.7.10-9.12.2.0-dev.jar").exists() - } - src 'http://downloads.gtnewhorizons.com/Mods_for_Jenkins/Railcraft_1.7.10-9.12.2.0-dev.jar' - dest file("libs/Railcraft_1.7.10-9.12.2.0-dev.jar") - mustRunAfter "deobfBinJar" - mustRunAfter "repackMinecraft" + //NEI + compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev" + compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev" + compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev" } -//task getGregTech(type: Download) { -// onlyIf { -// !file("libs/gregtech-${config.gregtech.version}-dev.jar").exists() -// } -// src "http://jenkins.usrv.eu:8080/job/Gregtech-5-Unofficial/${config.gregtech.jenkinsbuild}/artifact/build/libs/gregtech-${config.gregtech.version}-dev.jar" -// dest file("libs/gregtech-${config.gregtech.version}-dev.jar") -// mustRunAfter "deobfBinJar" -// mustRunAfter "repackMinecraft" -//} - -tasks.setupCIWorkspace.dependsOn getRailCraft -tasks.setupDevWorkspace.dependsOn getRailCraft -tasks.setupDecompWorkspace.dependsOn getRailCraft -tasks.compileJava.dependsOn getRailCraft - processResources { // this will ensure that this task is redone when the versions change. @@ -162,15 +161,15 @@ processResources // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { - include 'mcmod.info' + include "mcmod.info" // replace version and mcversion - expand 'version':project.version, 'mcversion':project.minecraft.version + expand "version":project.version, "mcversion":project.minecraft.version } // copy everything else, thats not the mcmod.info from(sourceSets.main.resources.srcDirs) { - exclude 'mcmod.info' + exclude "mcmod.info" } } @@ -178,28 +177,28 @@ jar { exclude ("assets/gregtech/textures/items/materialicons/copy.bat") exclude ("assets/gregtech/textures/blocks/materialicons/copy.bat") manifest { - attributes 'FMLCorePlugin': 'com.github.bartimaeusnek.ASM.BWCorePlugin','FMLCorePluginContainsFMLMod': 'true' + attributes "FMLCorePlugin": "com.github.bartimaeusnek.ASM.BWCorePlugin","FMLCorePluginContainsFMLMod": "true" } } task apiJar(type: Jar){ from(sourceSets.main.output) { - include 'com/github/bartimaeusnek/bartworks/API/**' - include 'com/github/bartimaeusnek/bartworks/util/**' - include 'com/github/bartimaeusnek/bartworks/system/material/Werkstoff.class' - include 'com/github/bartimaeusnek/crossmod/thaumcraft/util/**' + include "com/github/bartimaeusnek/bartworks/API/**" + include "com/github/bartimaeusnek/bartworks/util/**" + include "com/github/bartimaeusnek/bartworks/system/material/Werkstoff.class" + include "com/github/bartimaeusnek/crossmod/thaumcraft/util/**" } - classifier = 'API' + classifier = "API" } task sourceJar(type: Jar) { from sourceSets.main.allSource - classifier = 'sources' + classifier = "sources" } task devJar(type: Jar) { from sourceSets.main.output - classifier = 'dev' + classifier = "dev" } artifacts { @@ -208,24 +207,17 @@ artifacts { archives apiJar } -sonarqube { - properties { - property "sonar.projectName", "bartworks" - property "sonar.projectKey", "bartimaeusnek_bartworks" - } -} - -task signJar(dependsOn: 'reobf'){ +task signJar(dependsOn: "reobf"){ doLast { ant.signjar( destDir: jar.destinationDir, jar: jar.getArchivePath(), - alias: findProperty('keyStoreAlias') ?: '', - keystore: findProperty('keyStore') ?: '', - storepass: findProperty('keyStorePass') ?: '', - digestalg: findProperty('signDigestAlg') ?: '', - tsaurl: findProperty('signTSAurl') ?: '', + alias: findProperty("keyStoreAlias") ?: "", + keystore: findProperty("keyStore") ?: "", + storepass: findProperty("keyStorePass") ?: "", + digestalg: findProperty("signDigestAlg") ?: "", + tsaurl: findProperty("signTSAurl") ?: "", verbose: true ) } -} +} \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index daad77681b..9cc785acbf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip \ No newline at end of file -- cgit -- cgit From 6d1d43085cfd92d67483aac695cf7292d5072c34 Mon Sep 17 00:00:00 2001 From: bartimaeusnek Date: Mon, 12 Oct 2020 12:44:00 +0200 Subject: Updated Buildscript to kts Former-commit-id: 3f7b946b3e475f93c5bf4f58e42a64ec6d12be35 --- build.gradle | 223 ------------------------------------------------------ build.gradle.kts | 216 ++++++++++++++++++++++++++++++++++++++++++++++++++++ build.properties | 33 -------- gradle.properties | 30 ++++++++ 4 files changed, 246 insertions(+), 256 deletions(-) delete mode 100644 build.gradle create mode 100644 build.gradle.kts delete mode 100644 build.properties create mode 100644 gradle.properties diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 9bbee2d10b..0000000000 --- a/build.gradle +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 2018-2020 bartimaeusnek - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -buildscript { - repositories { - mavenCentral() - maven { - name = "forge" - url = "http://files.minecraftforge.net/maven" - } - maven { - name = "jitpack" - url = "https://jitpack.io" - } - } - dependencies { - classpath "com.github.GTNH2:ForgeGradle:0d2484b" - } -} - -apply plugin: "forge" -apply plugin: "signing" -apply plugin: "idea" -idea{ - module { - downloadJavadoc = true - downloadSources = true - } -} - -//noinspection GroovyUnusedAssignment -sourceCompatibility = JavaVersion.VERSION_1_8 -//noinspection GroovyUnusedAssignment -targetCompatibility = JavaVersion.VERSION_1_8 - -compileJava.options.encoding = "UTF-8" - -ext.configFile = file "build.properties" -configFile.withReader { - def prop = new Properties() - prop.load(it) - project.ext.config = new ConfigSlurper().parse prop -} - - -version = config.majorUpdate+"."+config.minorUpdate+"."+config.buildNumber -//noinspection GroovyUnusedAssignment -group= "com.github.bartimaeusnek.bartworks" // http://maven.apache.org/guides/mini/guide-naming-conventions.html -//noinspection GroovyUnusedAssignment -archivesBaseName = "bartworks"+ "[" + config.mc_version + "]" - -minecraft { - version = "1.7.10-10.13.4.1614-1.7.10" - replaceIn "MainMod.java" - replaceIn "API_REFERENCE.java" - replace "@version@", project.version - replace "@apiversion@", config.APIVersion - runDir = "run" -} - -repositories { - mavenLocal() - maven { - name = "gt" - url = "https://gregtech.overminddl1.com/" - } - maven { - name = "ic2" - url = "http://maven.ic2.player.to/" - } - maven { // GalacticGreg, YAMCore,.. - name "UsrvDE" - url "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/" - } - ivy { - name "gtnh_download_source_stupid_underscore_typo" - artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]" - } - ivy { - name "gtnh_download_source" - artifactPattern "http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]" - } - maven { - name = "OC repo" - url = "http://maven.cil.li/" - } - maven { - name = "jabba" - url = "http://default.mobiusstrip.eu/maven" - } - maven { - name = "chickenbones" - url = "http://chickenbones.net/maven/" - } - maven { - name = "Apple" - url "http://www.ryanliptak.com/maven/" - } - ivy { - name "BuildCraft" - artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]" - } - maven { - name = "jitpack" - url = "https://jitpack.io" - } -} - -dependencies { - //hard deps - compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev" - //compile "com.github.GTNH2:GT5-Unofficial:experimental-SNAPSHOT:dev" //broken jitpack.io dep - //soft deps - compileOnly "com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf" - compileOnly "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev" - compileOnly "mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev" - compileOnly "micdoodle8.mods:MicdoodleCore:${config.galacticraft.version}:Dev" - compileOnly "micdoodle8.mods:GalacticraftCore:${config.galacticraft.version}:Dev" - compileOnly "micdoodle8.mods:Galacticraft-Planets:${config.galacticraft.version}:Dev" - compileOnly "li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api" - compileOnly "net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev" - compileOnly "com.github.GTNewHorizons:GalacticGregGT5:master-SNAPSHOT" - compileOnly fileTree(dir: "libs", include: "*.jar") - - //CoreLibs for compile-age - //compileOnly "com.github.GTNH2:Yamcl:master-SNAPSHOT" //broken jitpack.io dep - compileOnly "applecore:AppleCore:${config.applecore.version}:api" - compileOnly "com.enderio.core:EnderCore:${config.enderiocore.version}:dev" - compileOnly "com.enderio:EnderIO:${config.enderio.version}:dev" - compileOnly "com.enderio:EnderIO:${config.enderio.version}:dev" - - //NEI - compile "codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev" - compile "codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev" - compile "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev" -} - -processResources -{ - // this will ensure that this task is redone when the versions change. - inputs.property "version", project.version - inputs.property "mcversion", project.minecraft.version - - // replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include "mcmod.info" - - // replace version and mcversion - expand "version":project.version, "mcversion":project.minecraft.version - } - - // copy everything else, thats not the mcmod.info - from(sourceSets.main.resources.srcDirs) { - exclude "mcmod.info" - } -} - -jar { - exclude ("assets/gregtech/textures/items/materialicons/copy.bat") - exclude ("assets/gregtech/textures/blocks/materialicons/copy.bat") - manifest { - attributes "FMLCorePlugin": "com.github.bartimaeusnek.ASM.BWCorePlugin","FMLCorePluginContainsFMLMod": "true" - } -} - -task apiJar(type: Jar){ - from(sourceSets.main.output) { - include "com/github/bartimaeusnek/bartworks/API/**" - include "com/github/bartimaeusnek/bartworks/util/**" - include "com/github/bartimaeusnek/bartworks/system/material/Werkstoff.class" - include "com/github/bartimaeusnek/crossmod/thaumcraft/util/**" - } - classifier = "API" -} - -task sourceJar(type: Jar) { - from sourceSets.main.allSource - classifier = "sources" -} - -task devJar(type: Jar) { - from sourceSets.main.output - classifier = "dev" -} - -artifacts { - archives devJar - archives sourceJar - archives apiJar -} - -task signJar(dependsOn: "reobf"){ - doLast { - ant.signjar( - destDir: jar.destinationDir, - jar: jar.getArchivePath(), - alias: findProperty("keyStoreAlias") ?: "", - keystore: findProperty("keyStore") ?: "", - storepass: findProperty("keyStorePass") ?: "", - digestalg: findProperty("signDigestAlg") ?: "", - tsaurl: findProperty("signTSAurl") ?: "", - verbose: true - ) - } -} \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000000..97376f1af6 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2018-2020 bartimaeusnek + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +import net.minecraftforge.gradle.user.UserExtension + +buildscript { + repositories { + mavenCentral() + maven { + name = "forge" + url = uri("http://files.minecraftforge.net/maven") + } + maven { + name = "jitpack" + url = uri("https://jitpack.io") + } + } + dependencies { + classpath("com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT") + } +} + +plugins { + idea + java +} + +apply(plugin = "forge") + +idea { + module { + isDownloadJavadoc = true + isDownloadSources = true + } +} + +java { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 +} + +tasks.withType { + options.encoding = "UTF-8" +} + +val majorUpdate : String by project +val minorUpdate : String by project +val buildNumber : String by project + +version = "$majorUpdate.$minorUpdate.$buildNumber" +group = "com.github.bartimaeusnek.bartworks" + +//minecraft block +configure{ + version = "1.7.10-10.13.4.1614-1.7.10" + replaceIn("MainMod.java") + replaceIn("API_REFERENCE.java") + replace("@version@", project.version) + val apiVersion : String by project + replace("@apiversion@", apiVersion) + runDir = "run" +} + +repositories { + mavenLocal() + maven { + name = "gt" + url = uri("https://gregtech.overminddl1.com/") + } + maven { + name = "ic2" + url = uri("http://maven.ic2.player.to/") + } + maven { // GalacticGreg, YAMCore,.. + name = "UsrvDE" + url = uri("http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/") + } + ivy { + name = "gtnh_download_source_stupid_underscore_typo" + artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]") + } + ivy { + name = "gtnh_download_source" + artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") + } + maven { + name = "OC repo" + url = uri("http://maven.cil.li/") + } + maven { + name = "jabba" + url = uri("http://default.mobiusstrip.eu/maven") + } + maven { + name = "chickenbones" + url = uri("http://chickenbones.net/maven/") + } + maven { + name = "Apple" + url = uri("http://www.ryanliptak.com/maven/") + } + ivy { + name = "BuildCraft" + artifactPattern("http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]") + } + maven { + name = "jitpack" + url = uri("https://jitpack.io") + } +} + +dependencies { + //Needed properties + val ic2Version : String by project + val galacticraftVersion : String by project + val applecoreVersion : String by project + val enderCoreVersion : String by project + val enderioVersion : String by project + //hard deps + compile("net.industrial-craft:industrialcraft-2:$ic2Version:dev") + //compile("com.github.GTNH2:GT5-Unofficial:experimental-SNAPSHOT:dev") //broken jitpack.io dep + //soft deps + compileOnly("com.azanor.baubles:Baubles:1.7.10-1.0.1.10:deobf") + compileOnly("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") + compileOnly("mods.railcraft:Railcraft_1.7.10:9.12.3.0:dev") + compileOnly("micdoodle8.mods:MicdoodleCore:$galacticraftVersion:Dev") + compileOnly("micdoodle8.mods:GalacticraftCore:$galacticraftVersion:Dev") + compileOnly("micdoodle8.mods:Galacticraft-Planets:$galacticraftVersion:Dev") + compileOnly("li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api") + compileOnly("net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev") + compileOnly("com.github.GTNewHorizons:GalacticGregGT5:master-SNAPSHOT") + //compileOnly(fileTree(dir = "libs", include = "*.jar")) + + //CoreLibs for compile-age + //compileOnly("com.github.GTNH2:Yamcl:master-SNAPSHOT") //broken jitpack.io dep + compileOnly("applecore:AppleCore:$applecoreVersion:api") + compileOnly("com.enderio.core:EnderCore:$enderCoreVersion:dev") + compileOnly("com.enderio:EnderIO:$enderioVersion:dev") + + //NEI + compile("codechicken:CodeChickenLib:1.7.10-1.1.3.140:dev") + compile("codechicken:CodeChickenCore:1.7.10-1.0.7.47:dev") + compile("codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev") +} + +val Project.minecraft : UserExtension + get() = extensions.getByName("minecraft") + +tasks.withType { + // this will ensure that this task is redone when the versions change. + inputs.properties += "version" to project.version + inputs.properties += "mcversion" to project.minecraft.version + archiveBaseName.set("bartworks[${project.minecraft.version}]") + + // replace stuff in mcmod.info, nothing else + filesMatching("/mcmod.info") { + expand(mapOf( + "version" to project.version, + "mcversion" to project.minecraft.version + )) + } +} + +tasks.jar { + exclude ("assets/gregtech/textures/items/materialicons/copy.bat") + exclude ("assets/gregtech/textures/blocks/materialicons/copy.bat") + manifest { + attributes["FMLCorePlugin"] = "com.github.bartimaeusnek.ASM.BWCorePlugin" + attributes["FMLCorePluginContainsFMLMod"] = "true" + } +} + +val apiJar by tasks.creating(Jar::class) { + from(sourceSets.main.get().output) { + include("com/github/bartimaeusnek/bartworks/API/**") + include("com/github/bartimaeusnek/bartworks/util/**") + include("com/github/bartimaeusnek/bartworks/system/material/Werkstoff.class") + include("com/github/bartimaeusnek/crossmod/thaumcraft/util/**") + } + archiveClassifier.set("API") +} + +val sourcesJar by tasks.creating(Jar::class) { + from(sourceSets.main.get().allSource) + archiveClassifier.set("sources") +} + +val devJar by tasks.creating(Jar::class) { + from(sourceSets.main.get().output) + archiveClassifier.set("dev") +} + +artifacts { + add("archives", apiJar) + add("archives", sourcesJar) + add("archives", devJar) +} \ No newline at end of file diff --git a/build.properties b/build.properties deleted file mode 100644 index bfd657b23f..0000000000 --- a/build.properties +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2018-2020 bartimaeusnek -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. -# -mc_version=1.7.10 -majorUpdate=0 -minorUpdate=5 -buildNumber=13.1 -APIVersion=11 -ic2.version=2.2.828-experimental -gregtech.version=5.09.33.38 -gregtech.jenkinsbuild=454 -applecore.version=1.7.10-3.1.1 -galacticraft.version=1.7-3.0.12.504 -enderio.version=1.7.10-2.3.0.429_beta -enderiocore.version=1.7.10-0.2.0.39_beta \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000000..4fdf782092 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,30 @@ +# +# Copyright (c) 2018-2020 bartimaeusnek +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +majorUpdate=0 +minorUpdate=5 +buildNumber=13.1 +apiVersion=11 +ic2Version=2.2.828-experimental +applecoreVersion=1.7.10-3.1.1 +galacticraftVersion=1.7-3.0.12.504 +enderioVersion=1.7.10-2.3.0.429_beta +enderCoreVersion=1.7.10-0.2.0.39_beta \ No newline at end of file -- cgit From 7c022285e62fdd436eb49dc24d2314221f7c9d0b Mon Sep 17 00:00:00 2001 From: bartimaeusnek Date: Mon, 12 Oct 2020 15:19:29 +0200 Subject: improved readability on buildscript Former-commit-id: abd20cf241cf00b6ce71a1e8df1c7c79bdfc28bc --- build.gradle.kts | 92 +++++++++++++++++++------------------------------------- 1 file changed, 31 insertions(+), 61 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 97376f1af6..d2a12b67a8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -25,14 +25,8 @@ import net.minecraftforge.gradle.user.UserExtension buildscript { repositories { mavenCentral() - maven { - name = "forge" - url = uri("http://files.minecraftforge.net/maven") - } - maven { - name = "jitpack" - url = uri("https://jitpack.io") - } + maven("http://files.minecraftforge.net/maven") + maven("https://jitpack.io") } dependencies { classpath("com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT") @@ -62,79 +56,55 @@ tasks.withType { options.encoding = "UTF-8" } -val majorUpdate : String by project -val minorUpdate : String by project -val buildNumber : String by project +val majorUpdate: String by project +val minorUpdate: String by project +val buildNumber: String by project version = "$majorUpdate.$minorUpdate.$buildNumber" group = "com.github.bartimaeusnek.bartworks" //minecraft block -configure{ +configure { version = "1.7.10-10.13.4.1614-1.7.10" replaceIn("MainMod.java") replaceIn("API_REFERENCE.java") replace("@version@", project.version) - val apiVersion : String by project + val apiVersion: String by project replace("@apiversion@", apiVersion) runDir = "run" } repositories { mavenLocal() - maven { - name = "gt" - url = uri("https://gregtech.overminddl1.com/") - } - maven { - name = "ic2" - url = uri("http://maven.ic2.player.to/") - } - maven { // GalacticGreg, YAMCore,.. - name = "UsrvDE" - url = uri("http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/") - } + maven("https://gregtech.overminddl1.com/") { this.name = "GT6Maven" } + maven("http://maven.ic2.player.to/") { this.name = "ic2" } + maven("http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/") { this.name = "UsrvDE/GTNH" } ivy { - name = "gtnh_download_source_stupid_underscore_typo" - artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]") + this.name = "gtnh_download_source_stupid_underscore_typo" + this.artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]") } ivy { - name = "gtnh_download_source" - artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") - } - maven { - name = "OC repo" - url = uri("http://maven.cil.li/") - } - maven { - name = "jabba" - url = uri("http://default.mobiusstrip.eu/maven") - } - maven { - name = "chickenbones" - url = uri("http://chickenbones.net/maven/") - } - maven { - name = "Apple" - url = uri("http://www.ryanliptak.com/maven/") + this.name = "gtnh_download_source" + this.artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") } ivy { - name = "BuildCraft" - artifactPattern("http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]") - } - maven { - name = "jitpack" - url = uri("https://jitpack.io") - } + this.name = "BuildCraft" + this.artifactPattern("http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]") + } + maven("http://maven.cil.li/") { this.name = "OpenComputers" } + maven("http://default.mobiusstrip.eu/maven") { this.name = "Jabba" } + maven("http://chickenbones.net/maven/") { this.name = "CodeChicken" } + maven("http://www.ryanliptak.com/maven/") { this.name = "appleCore" } + maven("https://jitpack.io") } dependencies { //Needed properties - val ic2Version : String by project - val galacticraftVersion : String by project - val applecoreVersion : String by project - val enderCoreVersion : String by project - val enderioVersion : String by project + val ic2Version: String by project + val galacticraftVersion: String by project + val applecoreVersion: String by project + val enderCoreVersion: String by project + val enderioVersion: String by project //hard deps compile("net.industrial-craft:industrialcraft-2:$ic2Version:dev") //compile("com.github.GTNH2:GT5-Unofficial:experimental-SNAPSHOT:dev") //broken jitpack.io dep @@ -148,7 +118,7 @@ dependencies { compileOnly("li.cil.oc:OpenComputers:MC1.7.10-1.5.+:api") compileOnly("net.sengir.forestry:forestry_1.7.10:4.2.16.64:dev") compileOnly("com.github.GTNewHorizons:GalacticGregGT5:master-SNAPSHOT") - //compileOnly(fileTree(dir = "libs", include = "*.jar")) + compileOnly(fileTree("libs") { this.include("*.jar") }) //CoreLibs for compile-age //compileOnly("com.github.GTNH2:Yamcl:master-SNAPSHOT") //broken jitpack.io dep @@ -162,7 +132,7 @@ dependencies { compile("codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev") } -val Project.minecraft : UserExtension +val Project.minecraft: UserExtension get() = extensions.getByName("minecraft") tasks.withType { @@ -181,8 +151,8 @@ tasks.withType { } tasks.jar { - exclude ("assets/gregtech/textures/items/materialicons/copy.bat") - exclude ("assets/gregtech/textures/blocks/materialicons/copy.bat") + exclude("assets/gregtech/textures/items/materialicons/copy.bat") + exclude("assets/gregtech/textures/blocks/materialicons/copy.bat") manifest { attributes["FMLCorePlugin"] = "com.github.bartimaeusnek.ASM.BWCorePlugin" attributes["FMLCorePluginContainsFMLMod"] = "true" -- cgit From 3c514e47cde4ff73e7b3685fd8dace8a13cb23f2 Mon Sep 17 00:00:00 2001 From: bartimaeusnek Date: Mon, 12 Oct 2020 15:52:44 +0200 Subject: Improved readability on the buildscript Former-commit-id: 53d03c8f616a1527a6d7c08a3947e61313c3df3d --- build.gradle.kts | 90 +++++++++++++++++++++++++++++++++----------------------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index d2a12b67a8..c5cb8b82db 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -42,14 +42,14 @@ apply(plugin = "forge") idea { module { - isDownloadJavadoc = true - isDownloadSources = true + this.isDownloadJavadoc = true + this.isDownloadSources = true } } java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + this.sourceCompatibility = JavaVersion.VERSION_1_8 + this.targetCompatibility = JavaVersion.VERSION_1_8 } tasks.withType { @@ -65,13 +65,21 @@ group = "com.github.bartimaeusnek.bartworks" //minecraft block configure { - version = "1.7.10-10.13.4.1614-1.7.10" - replaceIn("MainMod.java") - replaceIn("API_REFERENCE.java") - replace("@version@", project.version) + this.version = "1.7.10-10.13.4.1614-1.7.10" + this.includes.addAll( + arrayOf( + "MainMod.java", + "API_REFERENCE.java" + ) + ) val apiVersion: String by project - replace("@apiversion@", apiVersion) - runDir = "run" + this.replacements.putAll( + mapOf( + Pair("@version@", project.version), + Pair("@apiversion@", apiVersion) + ) + ) + this.runDir = "run" } repositories { @@ -137,50 +145,58 @@ val Project.minecraft: UserExtension tasks.withType { // this will ensure that this task is redone when the versions change. - inputs.properties += "version" to project.version - inputs.properties += "mcversion" to project.minecraft.version - archiveBaseName.set("bartworks[${project.minecraft.version}]") + this.inputs.properties += "version" to project.version + this.inputs.properties += "mcversion" to project.minecraft.version + this.archiveBaseName.set("bartworks[${project.minecraft.version}]") // replace stuff in mcmod.info, nothing else - filesMatching("/mcmod.info") { - expand(mapOf( - "version" to project.version, - "mcversion" to project.minecraft.version - )) + this.filesMatching("/mcmod.info") { + this.expand( + mapOf( + "version" to project.version, + "mcversion" to project.minecraft.version + ) + ) } } tasks.jar { - exclude("assets/gregtech/textures/items/materialicons/copy.bat") - exclude("assets/gregtech/textures/blocks/materialicons/copy.bat") - manifest { - attributes["FMLCorePlugin"] = "com.github.bartimaeusnek.ASM.BWCorePlugin" - attributes["FMLCorePluginContainsFMLMod"] = "true" - } + this.exclude( + "assets/gregtech/textures/items/materialicons/copy.bat", + "assets/gregtech/textures/blocks/materialicons/copy.bat" + ) + this.manifest.attributes( + mapOf( + Pair("FMLCorePlugin","com.github.bartimaeusnek.ASM.BWCorePlugin"), + Pair("FMLCorePluginContainsFMLMod","true") + ) + ) } val apiJar by tasks.creating(Jar::class) { - from(sourceSets.main.get().output) { - include("com/github/bartimaeusnek/bartworks/API/**") - include("com/github/bartimaeusnek/bartworks/util/**") - include("com/github/bartimaeusnek/bartworks/system/material/Werkstoff.class") - include("com/github/bartimaeusnek/crossmod/thaumcraft/util/**") + this.from(sourceSets.main.get().output) { + this.include( + "com/github/bartimaeusnek/bartworks/API/**", + "com/github/bartimaeusnek/bartworks/util/**", + "com/github/bartimaeusnek/bartworks/system/material/Werkstoff.class", + "com/github/bartimaeusnek/crossmod/thaumcraft/util/**" + ) } - archiveClassifier.set("API") + this.archiveClassifier.set("API") } val sourcesJar by tasks.creating(Jar::class) { - from(sourceSets.main.get().allSource) - archiveClassifier.set("sources") + this.from(sourceSets.main.get().allSource) + this.archiveClassifier.set("sources") } val devJar by tasks.creating(Jar::class) { - from(sourceSets.main.get().output) - archiveClassifier.set("dev") + this.from(sourceSets.main.get().output) + this.archiveClassifier.set("dev") } artifacts { - add("archives", apiJar) - add("archives", sourcesJar) - add("archives", devJar) + this.archives(apiJar) + this.archives(sourcesJar) + this.archives(devJar) } \ No newline at end of file -- cgit