diff --git a/Forge/build.gradle.kts b/Forge/build.gradle.kts index a55401c86..0958cfcb2 100644 --- a/Forge/build.gradle.kts +++ b/Forge/build.gradle.kts @@ -1,4 +1,6 @@ import net.darkhax.curseforgegradle.TaskPublishCurseForge +import net.minecraftforge.gradle.common.tasks.DownloadMavenArtifact +import net.minecraftforge.gradle.common.tasks.JarExec import org.gradle.api.tasks.testing.logging.TestExceptionFormat import org.gradle.api.tasks.testing.logging.TestLogEvent import net.darkhax.curseforgegradle.Constants as CFG_Constants @@ -148,7 +150,7 @@ tasks.withType().configureEach { } } -tasks.processResources { +tasks.withType { dependencyProjects.forEach { from(it.sourceSets.main.get().resources) } @@ -247,3 +249,11 @@ sourceSets.forEach { it.output.setResourcesDir(outputDir) it.java.destinationDirectory.set(outputDir) } + +tasks.withType { + notCompatibleWithConfigurationCache("uses Task.project at execution time") +} + +tasks.withType { + notCompatibleWithConfigurationCache("uses external process at execution time") +} diff --git a/ForgeApi/build.gradle.kts b/ForgeApi/build.gradle.kts index ad51bb578..b5835d746 100644 --- a/ForgeApi/build.gradle.kts +++ b/ForgeApi/build.gradle.kts @@ -1,3 +1,5 @@ +import net.minecraftforge.gradle.common.tasks.DownloadMavenArtifact + plugins { id("java") id("idea") @@ -120,3 +122,7 @@ publishing { } } } + +tasks.withType { + notCompatibleWithConfigurationCache("uses Task.project at execution time") +} diff --git a/NeoForge/build.gradle.kts b/NeoForge/build.gradle.kts index 42ba7eec4..465effe1a 100644 --- a/NeoForge/build.gradle.kts +++ b/NeoForge/build.gradle.kts @@ -61,7 +61,7 @@ tasks.withType().configureEach { } } -tasks.withType().configureEach { +tasks.withType { dependencyProjects.forEach { from(it.sourceSets.main.get().resources) } diff --git a/build.gradle.kts b/build.gradle.kts index 8f595a31d..95efacef2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -101,28 +101,27 @@ subprojects { } tasks.withType { - // this will ensure that this task is redone when the versions change. - inputs.property("version", version) - + val properties = mapOf( + "curseHomepageUrl" to curseHomepageUrl, + "fabricApiVersion" to fabricApiVersion, + "fabricLoaderVersion" to fabricLoaderVersion, + "forgeVersionRange" to forgeVersionRange, + "githubUrl" to githubUrl, + "forgeLoaderVersionRange" to forgeLoaderVersionRange, + "neoforgeVersionRange" to neoforgeVersionRange, + "neoforgeLoaderVersionRange" to neoforgeLoaderVersionRange, + "minecraftVersion" to minecraftVersion, + "minecraftVersionRange" to minecraftVersionRange, + "modAuthor" to modAuthor, + "modDescription" to modDescription, + "modId" to modId, + "modJavaVersion" to modJavaVersion, + "modName" to modName, + "version" to version, + ) + inputs.properties(properties) filesMatching(listOf("META-INF/mods.toml", "META-INF/neoforge.mods.toml", "pack.mcmeta", "fabric.mod.json")) { - expand(mapOf( - "curseHomepageUrl" to curseHomepageUrl, - "fabricApiVersion" to fabricApiVersion, - "fabricLoaderVersion" to fabricLoaderVersion, - "forgeVersionRange" to forgeVersionRange, - "githubUrl" to githubUrl, - "forgeLoaderVersionRange" to forgeLoaderVersionRange, - "neoforgeVersionRange" to neoforgeVersionRange, - "neoforgeLoaderVersionRange" to neoforgeLoaderVersionRange, - "minecraftVersion" to minecraftVersion, - "minecraftVersionRange" to minecraftVersionRange, - "modAuthor" to modAuthor, - "modDescription" to modDescription, - "modId" to modId, - "modJavaVersion" to modJavaVersion, - "modName" to modName, - "version" to version, - )) + expand(properties) } } diff --git a/gradle.properties b/gradle.properties index c0e86a0ec..f91a50d47 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,6 +6,8 @@ org.gradle.daemon=true # Disabled because this breaks ForgeGradle tasks org.gradle.configureondemand=false org.gradle.caching=true +org.gradle.configuration-cache=true +org.gradle.configuration-cache.problems=warn # JEI modName=Just Enough Items