From ae3cbfe4f686d42bb81f9d6c8f7707b2094fbdec Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Wed, 17 Jan 2024 14:42:55 +0900 Subject: [PATCH] Bump version to 1.25.2, cleanup of gradle stuff --- build.gradle | 37 +++++---------------------- gradle.properties | 23 +++++++++-------- src/main/resources/META-INF/mods.toml | 6 ++--- 3 files changed, 22 insertions(+), 44 deletions(-) diff --git a/build.gradle b/build.gradle index 1264f05..5860963 100644 --- a/build.gradle +++ b/build.gradle @@ -5,8 +5,8 @@ plugins { id 'net.neoforged.gradle.userdev' version '7.0.80' } -version = "1.25.1" -group = "com.burnedkirby.TurnBasedMinecraft" +version = mod_version +group = mod_group_id archivesBaseName = "TurnBasedMinecraft-NeoForge" java.toolchain.languageVersion = JavaLanguageVersion.of(17) @@ -96,17 +96,17 @@ dependencies { // A missing property will result in an error. Properties are expanded using ${} Groovy notation. // When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments. // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html -tasks.named('processResources', ProcessResources).configure { +tasks.withType(ProcessResources).configureEach { var replaceProperties = [ - minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range, + minecraft_version : minecraft_version, minecraft_version_range: minecraft_version_range, neo_version : neo_version, neo_version_range: neo_version_range, loader_version_range: loader_version_range, - mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version, - mod_authors: mod_authors, mod_description: mod_description, + mod_id : mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version, + mod_authors : mod_authors, mod_description: mod_description, ] inputs.properties replaceProperties - filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) { + filesMatching(['META-INF/mods.toml']) { expand replaceProperties + [project: project] } } @@ -124,7 +124,6 @@ jar { "Implementation-Vendor" :"TurnBasedMinecraftMod_BK", // Do not place timestamp for the sake of reproducible builds // "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), -// "ContainedDeps": "javamp3-1.0.3.jar" ]) } } @@ -138,25 +137,3 @@ tasks.withType(AbstractArchiveTask).configureEach { tasks.withType(JavaCompile).configureEach { options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation } - -// Example configuration to allow publishing using the maven-publish task -// we define a custom artifact that is sourced from the reobfJar output task -// and then declare that to be published -// Note you'll need to add a repository here -//def reobfFile = file("$buildDir/reobfJar/output.jar") -//def reobfArtifact = artifacts.add('default', reobfFile) { -// type 'jar' -// builtBy 'reobfJar' -//} -//publishing { -// publications { -// mavenJava(MavenPublication) { -// artifact reobfArtifact -// } -// } -// repositories { -// maven { -// url "file:///${project.projectDir}/mcmodsrepo" -// } -// } -//} diff --git a/gradle.properties b/gradle.properties index d4f4af6..79b64ad 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,19 +1,24 @@ org.gradle.jvmargs=-Xmx4096m org.gradle.daemon=false +org.gradle.debug=false -## Environment Properties - -# The Minecraft version must agree with the Forge version to get a valid artifact +#read more on this at https://github.com/neoforged/NeoGradle/blob/NG_7.0/README.md#apply-parchment-mappings +# you can also find the latest versions at: https://parchmentmc.org/docs/getting-started +neogradle.subsystems.parchment.minecraftVersion=1.20.3 +neogradle.subsystems.parchment.mappingsVersion=2023.12.31 +# Environment Properties +# You can find the latest versions here: https://projects.neoforged.net/neoforged/neoforge +# The Minecraft version must agree with the Neo version to get a valid artifact minecraft_version=1.20.4 # The Minecraft version range can use any release version of Minecraft as bounds. # Snapshots, pre-releases, and release candidates are not guaranteed to sort properly # as they do not follow standard versioning conventions. minecraft_version_range=[1.20.4,1.21) # The Neo version must agree with the Minecraft version to get a valid artifact -neo_version=20.4.108-beta -# The Neo version range can use any version of Neo as bounds or match the loader version range +neo_version=20.4.109-beta +# The Neo version range can use any version of Neo as bounds neo_version_range=[20.4,) -# The loader version range can only use the major version of Neo/FML as bounds +# The loader version range can only use the major version of FML as bounds loader_version_range=[2,) ## Mod Properties @@ -26,14 +31,12 @@ mod_name=TurnBasedMinecraftMod # The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default. mod_license=MIT # The mod version. See https://semver.org/ -mod_version=1.25.1 +mod_version=1.25.2 # The group ID for the mod. It is only important when publishing as an artifact to a Maven repository. # This should match the base package used for the mod sources. # See https://maven.apache.org/guides/mini/guide-naming-conventions.html -#mod_group_id=com.example.examplemod +mod_group_id=com.burnedkirby.TurnBasedMinecraft # The authors of the mod. This is a simple text string that is used for display purposes in the mod list. mod_authors=BurnedKirby a.k.a. Stephen Seo # The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list. mod_description=Implements turn-based-battle in Minecraft. -# Pack version - this changes each minecraft release, in general. -pack_format_number=18 diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 246d281..4ed71cd 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -9,7 +9,7 @@ modLoader="javafml" #mandatory loaderVersion="${loader_version_range}" #mandatory (34 is current forge version) # A URL to refer people to when problems occur with this mod issueTrackerURL="https://github.com/Stephen-Seo/TurnBasedMinecraftMod/issues" #optional -license="MIT" +license="${mod_license}" # A list of mods - how many allowed here is determined by the individual mod loader [[mods]] #mandatory # The modid of the mod @@ -29,9 +29,7 @@ credits="Thanks for this mod goes to Java" #optional # A text field displayed in the mod UI authors="${mod_authors}" #optional # The description text for the mod (multi line!) (#mandatory) -description=''' -Implements turn-based-battle in Minecraft. -''' +description='''${mod_description}''' logoFile="assets/com_burnedkirby_turnbasedminecraft/tbmm_icon.png"