From 2323e770d2a3f4860057bed0b4425a7ae865b7c2 Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Fri, 15 Jul 2022 19:29:42 -0700 Subject: [PATCH] Final fix-ups - Revert mods.toml version to ${file.jarVersion} - Fix license not being added to built jars - Rename LICENCE.md to LICENSE.md --- LICENCE.md => LICENSE.md | 0 build.gradle | 14 +++----------- src/main/resources/META-INF/mods.toml | 3 ++- 3 files changed, 5 insertions(+), 12 deletions(-) rename LICENCE.md => LICENSE.md (100%) diff --git a/LICENCE.md b/LICENSE.md similarity index 100% rename from LICENCE.md rename to LICENSE.md diff --git a/build.gradle b/build.gradle index 952fa137c..c2f7e6bc0 100644 --- a/build.gradle +++ b/build.gradle @@ -124,19 +124,11 @@ dependencies { } } -processResources { - inputs.property 'version', mod_version - - filesMatching('META-INF/mods.toml') { - expand 'version': mod_version - } -} - mixin { add sourceSets.main, 'flywheel.refmap.json' } -// Fix for SpongePowered/MixinGradle#38 +// Workaround for SpongePowered/MixinGradle#38 afterEvaluate { tasks.configureReobfTaskForReobfJar.mustRunAfter(tasks.compileJava) } @@ -172,8 +164,8 @@ java { } void addLicense(jarTask) { - jarTask.from('LICENSE') { - rename { "${it}_${project.archivesBaseName}" } + jarTask.from('LICENSE.md') { + rename '(.*)\\.(.*)', '$1_' + archivesBaseName + '.$2' } } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 347fb6482..1ca2ff67b 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -5,7 +5,8 @@ license = "MIT" [[mods]] modId = "flywheel" -version = "${version}" +# The Implementation-Version property in the jar's MANIFEST.MF file will be used as the mod version at runtime +version = "${file.jarVersion}" displayName = "Flywheel" logoFile = "logo.png" displayURL = "https://www.curseforge.com/minecraft/mc-mods/flywheel"