diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 000000000..75338898f --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,43 @@ +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'adopt' + cache: gradle + + - name: Grant execute permission for gradlew + run: chmod +x gradlew + + - name: Setup the workspace + run: ./gradlew setupCIWorkspace + + - name: Build the mod + run: ./gradlew build + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Latest Development Build" + files: build/libs/*.jar + diff --git a/.gitignore b/.gitignore index 97fbd3d13..4a0ea1e65 100644 --- a/.gitignore +++ b/.gitignore @@ -1,29 +1,29 @@ -.gradle/ -eclipse/ -.settings/ +.gradle +.settings +/.idea/ +/run/ +/build/ +/eclipse/ .classpath .project -.metadata/ -bin/ -out/ -libs/ -CREDITS-fml.txt -Core-Mod.iml -Core-Mod.ipr -Core-Mod.iws -LICENSE-fml.txt -MinecraftForge-Credits.txt -MinecraftForge-License.txt -README.txt -forge-1.7.10-10.13.2.1291-changelog.txt -CoreMod.iml -CoreMod.ipr -CoreMod.iws -Idea.bat -SetupDevWorkspaces.bat +/bin/ +/config/ +/crash-reports/ +/logs/ +options.txt +/saves/ +usernamecache.json +banned-ips.json +banned-players.json +eula.txt +ops.json +server.properties +servers.dat +usercache.json +whitelist.json +world/ +/out/ *.iml *.ipr *.iws -.idea/ -*.db -*.bat +src/main/resources/mixins.*.json diff --git a/Win_SetupWorkspace_Eclipse.bat b/Win_SetupWorkspace_Eclipse.bat deleted file mode 100644 index 170b7bccb..000000000 --- a/Win_SetupWorkspace_Eclipse.bat +++ /dev/null @@ -1,2 +0,0 @@ -del libs\*.jar -gradlew setupDecompWorkspace eclipse \ No newline at end of file diff --git a/Win_SetupWorkspace_Idea.bat b/Win_SetupWorkspace_Idea.bat deleted file mode 100644 index 207e49bb1..000000000 --- a/Win_SetupWorkspace_Idea.bat +++ /dev/null @@ -1,2 +0,0 @@ -del libs\*.jar -gradlew setupDecompWorkspace idea \ No newline at end of file diff --git a/build.gradle b/build.gradle index 0162a6a5f..5c3a3f49a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,36 +1,42 @@ +/* +DO NOT CHANGE THIS FILE! + +Also, you may replace this file at any time if there is an update available. +Please check https://github.com/SinTh0r4s/ExampleMod1.7.10/blob/main/build.gradle for updates. + */ + + +import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import java.util.concurrent.TimeUnit -import java.util.Properties -import groovy.util.ConfigSlurper buildscript { repositories { - mavenCentral() - jcenter() - maven { - name = "gt" - url = "https://gregtech.overminddl1.com/" - } + maven { + name = "jitpack" + url = "https://jitpack.io" + } maven { name = "forge" - url = "http://files.minecraftforge.net/maven" + url = "https://maven.minecraftforge.net" } maven { - name = "jitpack" - url = "https://jitpack.io" + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" } } dependencies { - classpath "com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT" + classpath 'com.github.GTNH2:ForgeGradle:FG_1.2-SNAPSHOT' } } plugins { id("org.ajoberstar.grgit") version("3.1.1") + id("com.github.johnrengelman.shadow") version("4.0.4") + id("com.palantir.git-version") version("0.12.3") } -apply plugin: "java" -apply plugin: "idea" -apply plugin: "forge" -apply plugin: "signing" + +apply plugin: 'forge' +apply plugin: 'idea' idea { module { @@ -40,184 +46,331 @@ idea { } } -java { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 -} +configurations.all { + resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS) -file "build.properties" withReader { - def prop = new Properties() - prop.load(it) - ext.config = new ConfigSlurper().parse prop + // Make sure GregTech build won't time out + System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String) + System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String) } -version = "${config.coremod.version}" -group = "com.dreammaster" -archivesBaseName = "GTNewHorizonsCoreMod" +// Pulls version from git tag +version = minecraftVersion + "-" + gitVersion() +group = modGroup +archivesBaseName = modId minecraft { - version = "${config.minecraft.version}-${config.forge.version}-${config.minecraft.version}" - runDir = "eclipse" + if(JavaVersion.current() != JavaVersion.VERSION_1_8) { + throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current()) + } + + version = minecraftVersion + "-" + forgeVersion + "-" + minecraftVersion + runDir = "run" - replaceIn "src/main/java/com/dreammaster/lib/Refstrings.java" - replace "GRADLETOKEN_VERSION", ((String) project.version).split("-")[1] + if (replaceGradleTokenInFile) { + replaceIn replaceGradleTokenInFile + if(gradleTokenModId) { + replace gradleTokenModId, modId + } + if(gradleTokenModName) { + replace gradleTokenModName, modName + } + if(gradleTokenModName) { + replace gradleTokenVersion, versionDetails().lastTag + } + if(gradleTokenGroupName) { + replace gradleTokenGroupName, modGroup + } + } +} + +apply from: 'repositories.gradle' + +configurations { + implementation.extendsFrom(shadowImplementation) } repositories { - maven { - name = "UsrvDE" - url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/" + if(usesMixins.toBoolean()) { + maven { + name = "sponge" + url = "https://repo.spongepowered.org/repository/maven-public" + } + maven { + url = "https://jitpack.io" + } } - maven { // Baubles - name = "UsrvDE_3rdParty" - url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/thirdparty/" +} + +dependencies { + if(usesMixins.toBoolean()) { + annotationProcessor("org.ow2.asm:asm-debug-all:5.0.3") + annotationProcessor("com.google.guava:guava:24.1.1-jre") + annotationProcessor("com.google.code.gson:gson:2.8.6") + annotationProcessor("org.spongepowered:mixin:0.8-SNAPSHOT") + // using 0.8 to workaround a issue in 0.7 which fails mixin application + compile("org.spongepowered:mixin:0.7.11-SNAPSHOT") { + // Mixin includes a lot of dependencies that are too up-to-date + exclude module: "launchwrapper" + exclude module: "guava" + exclude module: "gson" + exclude module: "commons-io" + exclude module: "log4j-core" + } + compile("com.github.GTNewHorizons:SpongeMixins:1.3.3:dev") } - maven { - name = "chickenbones" - url = "http://chickenbones.net/maven/" +} + +apply from: 'dependencies.gradle' + +task relocateShadowJar(type: ConfigureShadowRelocation) { + target = tasks.shadowJar + prefix = modGroup + ".shadow" +} + +def mixinConfigJson = "mixins." + modId + ".json" +def mixingConfigRefMap = "mixins." + modId + ".refmap.json" +def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap +def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg" + +task generateAssets { + if(usesMixins.toBoolean()) { + new File(projectDir.toString() + "/src/main/resources/", mixinConfigJson).text = """{ + "required": true, + "minVersion": "0.7.11", + "package": "${modGroup}.${mixinsPackage}", + "plugin": "${modGroup}.${mixinPlugin}", + "refmap": "${mixingConfigRefMap}", + "target": "@env(DEFAULT)", + "compatibilityLevel": "JAVA_8" +} + +""" } - maven { - name = "gt" - url = "https://gregtech.overminddl1.com/" +} + +shadowJar { + def manifestAttributes = [:] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] } - maven { // TConstruct - name = 'DVS1 Maven FS' - url = 'http://dvs1.progwml6.com/files/maven' + + if(accessTransformersFile) { + manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] } - maven { - url = "http://maven.ic2.player.to/" - name = "ic2" + + if(coreModClass) { + manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] } - maven { - url = "http://www.ryanliptak.com/maven/" - name = "applecore" + + if(usesMixins.toBoolean()) { + from refMap + manifestAttributes += [ + "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", + "MixinConfigs" : mixinConfigJson, + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false + ] } - maven { - url = "http://maven.cil.li/" - name = "OpenComputers" + manifest { + attributes(manifestAttributes) } - maven { - name = "jitpack" - url = "https://jitpack.io" + + minimize() + configurations = [project.configurations.shadowImplementation] + dependsOn(relocateShadowJar) +} + +jar { + def manifestAttributes = [:] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] } - ivy { - name = "gtnh_download_source" - artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") + + if(accessTransformersFile) { + manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] } - ivy { - name = "gtnh_download_source_stupid_underscore_typo" - artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]") + + if(coreModClass) { + manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] } -} -configurations.all { - resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS) - setTransitive(false) -} -dependencies { - compile "eu.usrv:YAMCore:${config.minecraft.version}-${config.yamcore.version}:deobf" - compile "com.azanor.baubles:Baubles:${config.baubles.version}:deobf" - compile ("appeng:appliedenergistics2:${config.ae2.version}:api") { - exclude module: "*" + if(usesMixins.toBoolean()) { + from refMap + manifestAttributes += [ + "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", + "MixinConfigs" : mixinConfigJson, + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false + ] } - compile "applecore:AppleCore:${config.applecore.version}:deobf" - compile "codechicken:CodeChickenLib:${config.minecraft.version}-${config.codechickenlib.version}:dev" - compile "codechicken:CodeChickenCore:${config.minecraft.version}-${config.codechickencore.version}:dev" - compile "codechicken:NotEnoughItems:${config.minecraft.version}-${config.nei.version}:dev" - compile "net.industrial-craft:industrialcraft-2:${config.ic2.version}:dev" - compile ("com.enderio:EnderIO:${config.minecraft.version}-${config.enderio.version}:dev") { - exclude group: "mcp.mobius.waila" + manifest { + attributes(manifestAttributes) } - compile "com.enderio.core:EnderCore:${config.minecraft.version}-${config.endercore.version}:dev" - compile "thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev" - //downloads.gtnewhorizons.com - compile ":HardcoreEnderExpansion:MC-1.7.10_v1.8.6" - compile ":Railcraft:1.7.10-9.12.2.0:dev" - compile ":GT-PlusPlus:1.7.05.53" - compile ":twilightforest:1.7.10-2.3.8.5-dev-deobf" - compile ":WitcheryExtras:1.0.1-dev" - compile ":witchery:1.7.10-0.24.1:deobf" - //jitpack - compile("com.github.GTNewHorizons:GT5-Unofficial:experimental-SNAPSHOT:dev") { - setChanging(true) + if(usesShadowedDependencies.toBoolean()) { + dependsOn(shadowJar) + enabled = false } - compile "com.github.GTNewHorizons:StructureLib:1.0.6:deobf" - compile("com.github.GTNewHorizons:TinkersConstruct:master-SNAPSHOT:deobf") { - setChanging(true) +} + +reobf { + if(usesMixins.toBoolean()) { + addExtraSrgFile mixinSrg } - compile("mantle:Mantle:1.7.10-0.3.2.jenkins207:deobf") - compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-1.7.10-SNAPSHOT:dev") { - setChanging(true) +} + +afterEvaluate { + if(usesMixins.toBoolean()) { + tasks.compileJava { + options.compilerArgs += [ + "-AreobfSrgFile=${tasks.reobf.srg}", + "-AoutSrgFile=${mixinSrg}", + "-AoutRefMapFile=${refMap}", + // Elan: from what I understand they are just some linter configs so you get some warning on how to properly code + "-XDenableSunApiLintControl", + "-XDignore.symbol.file" + ] + } } - compile("com.github.GTNewHorizons:ForestryMC:GTNH-Fixes-SNAPSHOT:dev") { - setChanging(true) +} + +runClient { + def arguments = [] + + if(usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] } - compile("com.github.GTNewHorizons:GalacticGregGT5:master-SNAPSHOT") { - setChanging(true) + + if(developmentEnvironmentUserName) { + arguments += [ + "--username", + developmentEnvironmentUserName + ] } - compile("com.github.GTNewHorizons:bartworks:master-SNAPSHOT:dev") { - setChanging(true) + + args(arguments) +} + +runServer { + def arguments = [] + + if(usesMixins.toBoolean()) { + arguments += [ + "--mods=../build/libs/$modId-${version}.jar", + "--tweakClass org.spongepowered.asm.launch.MixinTweaker" + ] } - compile fileTree(dir: "libs", include: "*.jar") + + args(arguments) } processResources -{ - def cleanVersion = ((String) project.version).split("-")[1] - // this will ensure that this task is redone when the versions change. - inputs.property "version", cleanVersion - inputs.property "mcversion", project.minecraft.version + { + // 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 "minecraftVersion": project.minecraft.version, + "modVersion": versionDetails().lastTag, + "modId": modId, + "modName": modName + } - // replace stuff in mcmod.info, nothing else - from(sourceSets.main.resources.srcDirs) { - include "mcmod.info" + // copy everything else, thats not the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } + } + +task sourcesJar(type: Jar) { + from (sourceSets.main.allJava) + from (file("$projectDir/LICENSE")) + getArchiveClassifier().set('sources') - // replace version and mcversion - expand "version":cleanVersion, "mcversion":project.minecraft.version + def manifestAttributes = [:] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] } - // copy everything else, thats not the mcmod.info - from(sourceSets.main.resources.srcDirs) { - exclude "mcmod.info" + if(accessTransformersFile) { + manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] + } + + if(coreModClass) { + manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] + } + + if(usesMixins.toBoolean()) { + from refMap + manifestAttributes += [ + "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", + "MixinConfigs" : mixinConfigJson, + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false + ] + } + manifest { + attributes(manifestAttributes) } } task devJar(type: Jar) { from sourceSets.main.output getArchiveClassifier().set("dev") + + def manifestAttributes = [:] + if(containsMixinsAndOrCoreModOnly.toBoolean() == false) { + manifestAttributes += ["FMLCorePluginContainsFMLMod": true] + } + + if(accessTransformersFile) { + manifestAttributes += ["FMLAT" : accessTransformersFile.toString()] + } + + if(coreModClass) { + manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass] + } + + if(usesMixins.toBoolean()) { + from refMap + manifestAttributes += [ + "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", + "MixinConfigs" : mixinConfigJson, + "ForceLoadAsMod" : containsMixinsAndOrCoreModOnly.toBoolean() == false + ] + } manifest { - attributes "FMLCorePlugin": "com.dreammaster.coremod.DepLoader","FMLCorePluginContainsFMLMod": "true" + attributes(manifestAttributes) } } -task sourceJar(type: Jar) { - from sourceSets.main.allSource - getArchiveClassifier().set("sources") -} +task apiJar(type: Jar) { + from (sourceSets.main.allJava) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString() + '/**' + } -artifacts { - archives devJar - archives sourceJar -} + from (sourceSets.main.output) { + include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString() + '/**' + } -task signJar(dependsOn: "reobf"){ - doLast { - ant.signjar( - destDir: jar.getDestinationDirectory(), - jar: jar.getArchiveFile(), - alias: findProperty("keyStoreAlias") ?: "", - keystore: findProperty("keyStore") ?: "", - storepass: findProperty("keyStorePass") ?: "", - digestalg: findProperty("signDigestAlg") ?: "", - tsaurl: findProperty("signTSAurl") ?: "", - verbose: true - ) + from (sourceSets.main.resources.srcDirs) { + include("LICENSE") } + + getArchiveClassifier().set('api') } -jar { - manifest { - attributes "FMLCorePlugin": "com.dreammaster.coremod.DreamCoreMod","FMLCorePluginContainsFMLMod": "true" + +artifacts { + archives sourcesJar + archives devJar + if(apiPackage) { + archives apiJar } } diff --git a/build.properties b/build.properties deleted file mode 100644 index 2d8f84e84..000000000 --- a/build.properties +++ /dev/null @@ -1,22 +0,0 @@ -minecraft.version=1.7.10 -forge.version=10.13.4.1614 -coremod.version=1.7.10-1.9.00 - - -yamcore.version=0.5.80 -baubles.version=1.0.1.10 -ae2.version=rv2-stable-10 -applecore.version=1.7.10-1.1.0 -codechickenlib.version=1.1.3.138 -codechickencore.version=1.0.4.29 -ic2.version=2.2.790-experimental -nei.version=1.0.3.74 -forestry.version=4.2.16.64 -enderio.version=2.3.0.429_beta -endercore.version=0.2.0.39_beta - -gregtech.jenkinsbuild=1540 -gregtech.version=5.09.37.11 - -ggreg.jenkinsbuild=6 -ggreg.version=1.0.2 diff --git a/dependencies.gradle b/dependencies.gradle new file mode 100644 index 000000000..c662a750e --- /dev/null +++ b/dependencies.gradle @@ -0,0 +1,86 @@ +// Add your dependencies here + +dependencies { + compile("eu.usrv:YAMCore:1.7.10-0.5.80:deobf") { + transitive = false + } + compile("com.azanor.baubles:Baubles:1.0.1.10:deobf") { + transitive = false + } + compile("applecore:AppleCore:1.7.10-1.1.0:deobf") { + transitive = false + } + compile("codechicken:CodeChickenLib:1.7.10-1.1.3.138:dev") { + transitive = false + } + compile("codechicken:CodeChickenCore:1.7.10-1.0.4.29:dev") { + transitive = false + } + compile("codechicken:NotEnoughItems:1.7.10-1.0.3.74:dev") { + transitive = false + } + compile("net.industrial-craft:industrialcraft-2:2.2.790-experimental:dev") { + transitive = false + } + compile("com.enderio:EnderIO:1.7.10-2.3.0.429_beta:dev") { + transitive = false + exclude group: "mcp.mobius.waila" + } + compile("com.enderio.core:EnderCore:1.7.10-0.2.0.39_beta:dev") { + transitive = false + } + compile("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev") { + transitive = false + } + + //downloads.gtnewhorizons.com + compile(":HardcoreEnderExpansion:MC-1.7.10_v1.8.6") { + transitive = false + } + compile(":Railcraft:1.7.10-9.12.2.0:dev") { + transitive = false + } + compile(":GT-PlusPlus:1.7.05.53") { + transitive = false + } + compile(":twilightforest:1.7.10-2.3.8.5-dev-deobf") { + transitive = false + } + compile(":WitcheryExtras:1.0.1-dev") { + transitive = false + } + compile(":witchery:1.7.10-0.24.1:deobf") { + transitive = false + } + //jitpack + compile("com.github.GTNewHorizons:GT5-Unofficial:experimental-SNAPSHOT:dev") { + transitive = false + setChanging(true) + } + compile("com.github.GTNewHorizons:StructureLib:1.0.6:deobf") { + transitive = false + } + compile("com.github.GTNewHorizons:TinkersConstruct:master-SNAPSHOT:deobf") { + transitive = false + setChanging(true) + } + compile("mantle:Mantle:1.7.10-0.3.2.jenkins207:deobf") { + transitive = false + } + compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-1.7.10-SNAPSHOT:dev") { + transitive = false + setChanging(true) + } + compile("com.github.GTNewHorizons:ForestryMC:GTNH-Fixes-SNAPSHOT:dev") { + transitive = false + setChanging(true) + } + compile("com.github.GTNewHorizons:GalacticGregGT5:master-SNAPSHOT") { + transitive = false + setChanging(true) + } + compile("com.github.GTNewHorizons:bartworks:master-SNAPSHOT:dev") { + transitive = false + setChanging(true) + } +} diff --git a/gradle.properties b/gradle.properties index 04bb111a6..d1627f113 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,2 +1,57 @@ -systemProp.org.gradle.internal.http.connectionTimeout=120000 -systemProp.org.gradle.internal.http.socketTimeout=120000 \ No newline at end of file +modName = GTNewHorizonsCoreMod + +# This is a case-sensitive string to identify your mod. Convention is to use lower case. +modId = mymodid + +modGroup = com.dreammaster + +# WHY is there no version field? +# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the +# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/ + +minecraftVersion = 1.7.10 +forgeVersion = 10.13.4.1614 + +# Select a username for testing your mod with breakpoints. You may leave this empty for a random user name each time you +# restart Minecraft in development. Choose this dependent on your mod: +# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name +# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty +developmentEnvironmentUserName = "Developer" + +# Define a source file of your project with: +# public static final String VERSION = "GRADLETOKEN_VERSION"; +# The string's content will be replaced with your mods version when compiled. You should use this to specify your mod's +# version in @Mod([...], version = VERSION, [...]) +# Leave these properties empty to skip individual token replacements +replaceGradleTokenInFile = Refstrings.java +gradleTokenModId = +gradleTokenModName = +gradleTokenVersion = GRADLETOKEN_VERSION +gradleTokenGroupName = + +# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise you can +# leave this property empty. +# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api +apiPackage = + +# Specify the configuration file for Forge's access transformers here. I must be placed into /src/main/resources/META-INF/ +# Example value: mymodid_at.cfg +accessTransformersFile = + +# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled! +usesMixins = false +# Specify the location of your implementation of IMixinPlugin. Leave it empty otherwise. +mixinPlugin = +# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail! +mixinsPackage = +# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin! +# This parameter is for legacy compatability only +# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin +coreModClass = coremod.DreamCoreMod +# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class +# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false! +containsMixinsAndOrCoreModOnly = false + +# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your +# responsibility check the licence and request permission for distribution, if required. +usesShadowedDependencies = false diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 3baa851b2..5c2d1cf01 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fd50c3ca2..5028f28f8 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip \ No newline at end of file diff --git a/jitpack.yml b/jitpack.yml new file mode 100644 index 000000000..09bbb514f --- /dev/null +++ b/jitpack.yml @@ -0,0 +1,2 @@ +before_install: + - ./gradlew setupCIWorkspace \ No newline at end of file diff --git a/repositories.gradle b/repositories.gradle new file mode 100644 index 000000000..9acecbfc9 --- /dev/null +++ b/repositories.gradle @@ -0,0 +1,48 @@ +// Add any additional repositiroes for your dependencies here + +repositories { + maven { + name = "UsrvDE" + url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases/" + } + maven { // Baubles + name = "UsrvDE_3rdParty" + url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/thirdparty/" + } + maven { + name = "chickenbones" + url = "http://chickenbones.net/maven/" + } + maven { + name = "gt" + url = "https://gregtech.overminddl1.com/" + } + maven { // TConstruct + name = 'DVS1 Maven FS' + url = 'http://dvs1.progwml6.com/files/maven' + } + maven { + url = "http://maven.ic2.player.to/" + name = "ic2" + } + maven { + url = "http://www.ryanliptak.com/maven/" + name = "applecore" + } + maven { + url = "http://maven.cil.li/" + name = "OpenComputers" + } + maven { + name = "jitpack" + url = "https://jitpack.io" + } + ivy { + name = "gtnh_download_source" + artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]-[revision].[ext]") + } + ivy { + name = "gtnh_download_source_stupid_underscore_typo" + artifactPattern("http://downloads.gtnewhorizons.com/Mods_for_Jenkins/[module]_[revision].[ext]") + } +} diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index b695db3f1..f2f36b89a 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,10 +1,10 @@ [ { - "modid": "dreamcraft", - "name": "GT: New Horizons", + "modid": "${modId}", + "name": "${modName}", "description": "Core Mod for the GT: New Horizons Pack.", - "version": "${version}", - "mcversion": "${mcversion}", + "version": "${modVersion}", + "mcversion": "${minecraftVersion}", "url": "", "updateUrl": "", "authorList": ["DreamMasterXXL, Namikon"],