diff --git a/build.gradle b/build.gradle index 5384bb2..810ad5c 100644 --- a/build.gradle +++ b/build.gradle @@ -15,12 +15,11 @@ buildscript { apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' -version = '1.19-3.2.3' -group = 'exopandora.worldhandler' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +version = "${minecraft_version}-${version}" archivesBaseName = 'WorldHandler' java.toolchain.languageVersion = JavaLanguageVersion.of(17) -println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) +println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + ' (' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) minecraft { // The mappings can be changed at any time, and must be in the following format. @@ -34,7 +33,7 @@ minecraft { // // Use non-default mappings at your own risk. they may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'official', version: '1.19' + mappings channel: 'official', version: minecraft_version // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') @@ -42,6 +41,7 @@ minecraft { runs { client { workingDirectory project.file('run') + taskName 'WorldHandler Client' // Recommended logging data for a userdev environment // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' @@ -58,6 +58,7 @@ minecraft { server { workingDirectory project.file('run') + taskName 'WorldHandler Server' // Recommended logging data for a userdev environment // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' @@ -74,6 +75,7 @@ minecraft { data { workingDirectory project.file('run') + taskName 'WorldHandler Data' // Recommended logging data for a userdev environment // property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' @@ -106,7 +108,7 @@ dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. - minecraft 'net.minecraftforge:forge:1.19-41.0.96' + minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" @@ -135,9 +137,15 @@ jar { "Specification-Version": "1", "Implementation-Title": project.name, "Implementation-Version": "${version}", - "Implementation-Vendor" :"Exopandora", + "Implementation-Vendor": "Exopandora", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "Main-Class": "exopandora.worldhandler.Main" ]) } } + +processResources { + filesMatching(['mods.toml']) { + expand project.properties + } +} diff --git a/gradle.properties b/gradle.properties index 911de12..b8f096f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,9 @@ -# 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 \ No newline at end of file +# WorldHandler +version=3.2.3 +group=exopandora.worldhandler +minecraft_version=1.19 +forge_version=41.0.100 + +# Gradle +org.gradle.jvmargs=-Xmx3G +org.gradle.daemon=false diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 6335c25..1e2d4ba 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -11,7 +11,7 @@ license="GPL v3.0" [[mods]] modId="worldhandler" - version="1.19-3.2.3" + version="${minecraft_version}-${version}" displayName="World Handler" description="The World Handler provides a simple and easy to use graphical user interface for commands. It lets you create powerful and complex sub-commands alongside NBT-structures within seconds."