More work towards config caching support (#1115)

This commit is contained in:
modmuss
2024-05-05 10:21:36 +01:00
committed by GitHub
parent 8ba38ef904
commit 5b7d598d02
4 changed files with 18 additions and 5 deletions

View File

@@ -284,6 +284,16 @@ test {
}
}
// Workaround https://github.com/gradle/gradle/issues/25898
tasks.withType(Test).configureEach {
jvmArgs = [
'--add-opens=java.base/java.lang=ALL-UNNAMED',
'--add-opens=java.base/java.util=ALL-UNNAMED',
'--add-opens=java.base/java.lang.invoke=ALL-UNNAMED',
'--add-opens=java.base/java.net=ALL-UNNAMED'
]
}
import org.gradle.api.internal.artifacts.configurations.ConfigurationRoles
import org.gradle.launcher.cli.KotlinDslVersion

View File

@@ -6,7 +6,7 @@ mockito = "5.11.0"
java-debug = "0.52.0"
mixin = "0.12.5+mixin.0.8.5"
gradle-nightly = "8.9-20240426001649+0000"
gradle-nightly = "8.9-20240505002558+0000"
fabric-loader = "0.15.10"
fabric-installer = "1.0.1"

View File

@@ -103,7 +103,8 @@ public abstract class JarManifestService implements BuildService<JarManifestServ
}
}
private record MixinVersion(String group, String version) implements Serializable { }
// Must be public for configuration cache
public record MixinVersion(String group, String version) implements Serializable { }
private static Provider<MixinVersion> getMixinVersion(Project project) {
return project.getConfigurations().named(Constants.Configurations.LOADER_DEPENDENCIES).map(configuration -> {

View File

@@ -54,8 +54,10 @@ class ConfigurationCacheTest extends Specification implements GradleProjectTestT
result2.task(":${task}").outcome != FAILED
where:
task | _
"help" | _
"configureClientLaunch" | _
task | _
"help" | _
"configureClientLaunch" | _
"jar" | _
"check" | _
}
}