From eb593da0f067f8ffe857d5b7d399f36b1800df10 Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Sat, 7 Dec 2024 14:07:23 +0200 Subject: [PATCH] Disable useLegacyMixinAp check in getDefaultRefmapName() Fixes #242. --- .../java/net/fabricmc/loom/extension/MixinExtensionImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/fabricmc/loom/extension/MixinExtensionImpl.java b/src/main/java/net/fabricmc/loom/extension/MixinExtensionImpl.java index 8017e9b6a..cc8b03a6a 100644 --- a/src/main/java/net/fabricmc/loom/extension/MixinExtensionImpl.java +++ b/src/main/java/net/fabricmc/loom/extension/MixinExtensionImpl.java @@ -61,7 +61,10 @@ public MixinExtensionImpl(Project project) { @Override public Property getDefaultRefmapName() { - if (!super.getUseLegacyMixinAp().get()) throw new IllegalStateException("You need to set useLegacyMixinAp = true to configure Mixin annotation processor."); + // Arch: We need to access afterEvaluate state in useLegacyMixinAp's convention, so let's not query it. + // Otherwise, this property can't be set in a buildscript without afterEvaluate. + // https://github.com/architectury/architectury-loom/issues/242 + // if (!super.getUseLegacyMixinAp().get()) throw new IllegalStateException("You need to set useLegacyMixinAp = true to configure Mixin annotation processor."); return defaultRefmapName; }