Update to Gradle 8.8 (#1125)

This commit is contained in:
modmuss
2024-06-14 08:49:47 +01:00
committed by GitHub
parent eacd6fbc5f
commit 097fd98fc9
19 changed files with 83 additions and 67 deletions

View File

@@ -85,10 +85,16 @@ configurations {
testRuntimeClasspath.extendsFrom bootstrap
}
configurations.all {
configurations.configureEach {
resolutionStrategy {
failOnNonReproducibleResolution()
}
if (canBeConsumed) {
attributes {
attribute(GradlePluginApiVersion.GRADLE_PLUGIN_API_VERSION_ATTRIBUTE, objects.named(GradlePluginApiVersion, GradleVersion.current().getVersion()))
}
}
}
sourceSets {
@@ -354,7 +360,7 @@ publishing {
}
// Need to tweak this file to pretend we are compatible with j8 so the bootstrap will run.
tasks.withType(GenerateModuleMetadata) {
tasks.withType(GenerateModuleMetadata).configureEach {
doLast {
def file = outputFile.get().asFile
@@ -369,7 +375,7 @@ tasks.withType(GenerateModuleMetadata) {
}
// A task to output a json file with a list of all the test to run
task writeActionsTestMatrix() {
tasks.register('writeActionsTestMatrix') {
doLast {
def testMatrix = []
file('src/test/groovy/net/fabricmc/loom/test/integration').eachFile {
@@ -409,7 +415,7 @@ tasks.named('wrapper') {
/**
* Run this task to download the gradle sources next to the api jar, you may need to manually attach the sources jar
*/
task downloadGradleSources() {
tasks.register('downloadGradleSources') {
doLast {
// Awful hack to find the gradle api location
def gradleApiFile = project.configurations.detachedConfiguration(dependencies.gradleApi()).files.stream()
@@ -427,13 +433,13 @@ task downloadGradleSources() {
}
}
task printActionsTestName(type: PrintActionsTestName) {
tasks.register('printActionsTestName', PrintActionsTestName) {
}
/**
* Replaces invalid characters in test names for GitHub Actions artifacts.
*/
class PrintActionsTestName extends DefaultTask {
abstract class PrintActionsTestName extends DefaultTask {
@Input
@Option(option = "name", description = "The test name")
String testName