From dfaf6d5d34125579c58b81314e0cd9d7a59fd59a Mon Sep 17 00:00:00 2001 From: Rongmario Date: Tue, 26 Apr 2022 12:21:03 +0100 Subject: [PATCH] Explicitly call toBoolean when evaluating Boolean properties --- build.gradle | 16 ++++++++-------- gradle.properties | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 5542286..194c9ab 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ buildscript { } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' - if (project.use_mixins) { + if (project.use_mixins.toBoolean()) { classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT' } } @@ -17,7 +17,7 @@ buildscript { apply plugin: 'net.minecraftforge.gradle.forge' -if (project.use_mixins) { +if (project.use_mixins.toBoolean()) { apply plugin: 'org.spongepowered.mixin' } @@ -41,10 +41,10 @@ minecraft { runDir = 'run' mappings = 'stable_39' def args = [] - if (project.use_coremod) { + if (project.use_coremod.toBoolean()) { args << '-Dfml.coreMods.load=' + coremod_plugin_class_name } - if (project.use_mixins) { + if (project.use_mixins.toBoolean()) { args << '-Dmixin.hotSwap=true' args << '-Dmixin.checks.interfaces=true' args << '-Dmixin.debug.export=true' @@ -64,10 +64,10 @@ repositories { dependencies { - if (project.use_assetmover) { + if (project.use_assetmover.toBoolean()) { deobfCompile 'com.cleanroommc:assetmover:0.2' } - if (project.use_mixins) { + if (project.use_mixins.toBoolean()) { deobfCompile 'zone.rong:mixinbooter:4.2' } @@ -101,10 +101,10 @@ processResources { jar { manifest { def attribute_map = [:] - if (project.use_coremod) { + if (project.use_coremod.toBoolean()) { attribute_map['FMLCorePlugin'] = project.coremod_plugin_class_name } - if (project.use_mixins) { + if (project.use_mixins.toBoolean()) { attribute_map['TweakClass'] = 'org.spongepowered.asm.launch.MixinTweaker' } attributes(attribute_map) diff --git a/gradle.properties b/gradle.properties index 6705ff8..845131c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,6 +7,8 @@ mod_version = 1.0 maven_group = com.cleanroommc archives_base_name = modid +# If any properties changes below this line, run `gradlew setupDecompWorkspace` and refresh gradle again to ensure everything is working correctly. + # Boilerplate Options use_mixins = false use_coremod = false