diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 81298c5..a3534fd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,6 +12,7 @@ immutables = "2.10.0" indra = "3.1.3" junit = "5.10.1" mergeTool = "1.2.0" +mammoth = "1.3.1" [libraries] # shared @@ -37,6 +38,7 @@ junit-engine = { module = "org.junit.jupiter:junit-jupiter-engine" } junit-launcher = { module = "org.junit.platform:junit-platform-launcher" } mergeTool = { module = "net.minecraftforge:mergetool", version.ref = "mergeTool" } shadowPlugin = { module = "com.github.jengelman.gradle.plugins:shadow", version = "6.1.0" } +mammoth = { module = "net.kyori:mammoth", version.ref = "mammoth" } [plugins] blossom = { id = "net.kyori.blossom", version = "2.1.0" } diff --git a/subprojects/gradle-plugin/build.gradle.kts b/subprojects/gradle-plugin/build.gradle.kts index 93630ec..d07b8e1 100644 --- a/subprojects/gradle-plugin/build.gradle.kts +++ b/subprojects/gradle-plugin/build.gradle.kts @@ -47,6 +47,7 @@ dependencies { exclude("org.ow2.asm") // Use our own ASM exclude("net.sf.jopt-simple") } + commonDeps(libs.mammoth) // Just main implementation(libs.gson) diff --git a/subprojects/gradle-plugin/src/main/java/org/spongepowered/gradle/vanilla/internal/repository/MinecraftRepositoryPlugin.java b/subprojects/gradle-plugin/src/main/java/org/spongepowered/gradle/vanilla/internal/repository/MinecraftRepositoryPlugin.java index 90ccef3..41d4911 100644 --- a/subprojects/gradle-plugin/src/main/java/org/spongepowered/gradle/vanilla/internal/repository/MinecraftRepositoryPlugin.java +++ b/subprojects/gradle-plugin/src/main/java/org/spongepowered/gradle/vanilla/internal/repository/MinecraftRepositoryPlugin.java @@ -24,6 +24,7 @@ */ package org.spongepowered.gradle.vanilla.internal.repository; +import net.kyori.mammoth.Properties; import org.checkerframework.checker.nullness.qual.Nullable; import org.gradle.api.Action; import org.gradle.api.InvalidUserDataException; @@ -302,8 +303,7 @@ private static Provider resolveCache( final String propertyName, final File root ) { - return providers.gradleProperty(propertyName) - .forUseAtConfigurationTime() + return Properties.forUseAtConfigurationTime(providers.gradleProperty(propertyName)) .map(dirName -> { final File dir = new File(dirName); if (dir.isAbsolute()) {