fix: Properly support isolated projects

This commit is contained in:
Siphalor committed 2026-10-25 13:43:51 +01:00
1 parent 3152e4d3f5
commit c1ef6b7dcd
3 files changed
+78 -22

No files matched your search

@@ -61,8 +61,11 @@ abstract class SmcmtkSettingsPlugin : Plugin<Settings> {
settings.gradle.lifecycle.beforeProject { project ->
project.extensions.findByType(ExtraPropertiesExtension::class.java)?.apply {
// Loom uses the same jar for both plugin variants (plain and remap) and tries to determine
// which one is in use by checking the plugin manager.
// This doesn't seem to work when using convention plugins, so we're forcing the remapping off here.
// which one is in use by checking the plugin manager by the plugin id.
// This doesn't work when the Loom plugin is in the classpath already due to convention plugins.
// Since in this case Gradle doesn't register the plugin id, we're forcing the remapping off here.
// This notably doesn't work in isolated projects as Loom uses providers.gradleProperty there
// which can't be overwritten programmatically.
set("fabric.loom.disableObfuscation", "true")
set("fabric.loom.dontRemap", "true")
}