From a3b989b83f5d6918a73812d80bf3811cd056c307 Mon Sep 17 00:00:00 2001 From: Cat Core Date: Sun, 25 Feb 2024 15:57:04 +0100 Subject: [PATCH] Don't call getProject during task execution --- gradle.properties | 2 +- .../legacyfabric/multifilament/MultiFilamentExtension.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index b69d81f..05f0806 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -multi_filament_version=0.2.7 +multi_filament_version=0.2.8 asm_version=9.5 unpick_version=2.3.0 \ No newline at end of file diff --git a/src/main/java/net/legacyfabric/multifilament/MultiFilamentExtension.java b/src/main/java/net/legacyfabric/multifilament/MultiFilamentExtension.java index d701671..10feede 100644 --- a/src/main/java/net/legacyfabric/multifilament/MultiFilamentExtension.java +++ b/src/main/java/net/legacyfabric/multifilament/MultiFilamentExtension.java @@ -35,9 +35,11 @@ public static MultiFilamentExtension get(Project project) { public abstract Property getMapJarGroupGroup(); private IntermediaryProvider intermediaryProvider; + private final Property minecraftVersion; @Inject public MultiFilamentExtension() { + minecraftVersion = FilamentExtension.get(getProject()).getMinecraftVersion(); getIntermediaryRevision().finalizeValueOnRead(); getActiveMappingsDir().finalizeValueOnRead(); getMultiMappingsDir().finalizeValueOnRead(); @@ -96,7 +98,7 @@ protected void createTasks() { } private Property minecraftVersionGetter() { - return FilamentExtension.get(getProject()).getMinecraftVersion(); + return minecraftVersion; } public IntermediaryProvider getIntermediaryProvider() {