This is an automated email from the ASF dual-hosted git repository. jdaugherty pushed a commit to branch grails-geb in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit 6dd0f7494c2b62ad799df55b0386266a5982e31c Author: James Daugherty <[email protected]> AuthorDate: Sun Apr 20 21:10:18 2025 -0400 Ensure tck extraction always runs since it changes the classpath unexpectedly from gradle to detect when to cache --- gradle/grails-data-tck-config.gradle | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/gradle/grails-data-tck-config.gradle b/gradle/grails-data-tck-config.gradle index 51921906cb..b9ae1f8bd3 100644 --- a/gradle/grails-data-tck-config.gradle +++ b/gradle/grails-data-tck-config.gradle @@ -25,7 +25,9 @@ dependencies { // Dynamic test discovery also won't find them so extract the class files to force junit to work. TaskProvider<Sync> extractTck = tasks.register('extractTckJar', Sync) extractTck.configure { Sync it -> - inputs.files(configurations.tck) + it.inputs.files(configurations.tck) + it.outputs.upToDateWhen { false } + it.finalizedBy(tasks.named('test', Test)) it.from { zipTree(configurations.tck.singleFile) } it.into(layout.buildDirectory.dir('extracted-tck-classes')) @@ -39,11 +41,11 @@ cleanupTask.configure { Task it -> it.doLast { extractDir.get().asFile.deleteDir() } - it.outputs.upToDateWhen {false} + it.outputs.upToDateWhen { false } } -tasks.withType(Test).configureEach { - onlyIf { +tasks.withType(Test).configureEach { Test it -> + it.onlyIf { if (project.hasProperty('onlyFunctionalTests')) { return false } @@ -68,13 +70,13 @@ tasks.withType(Test).configureEach { return false } - if(project.hasProperty('skipTests')) { + if (project.hasProperty('skipTests')) { return false } true } - testClassesDirs = objects.fileCollection().from(extractTck, testClassesDirs) - finalizedBy(cleanupTask) + it.testClassesDirs = objects.fileCollection().from(extractTck, testClassesDirs) + it.finalizedBy(cleanupTask) }
