Skip to content

Commit 1af424c

Browse files
andimarekclaude
andcommitted
Fix testWithJava21 task running zero tests
The testWithJava21 task was missing testClassesDirs, classpath, and dependsOn configuration that testWithJava17 and testWithJava11 have. Without these, Gradle finds no test classes and silently succeeds with 0 tests executed. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6c2cdb0 commit 1af424c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

build.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,11 @@ tasks.register('testWithJava21', Test) {
361361
javaLauncher = javaToolchains.launcherFor {
362362
languageVersion = JavaLanguageVersion.of(21)
363363
}
364+
testClassesDirs = sourceSets.test.output.classesDirs
365+
classpath = sourceSets.test.runtimeClasspath
366+
classpath += sourceSets.jmh.output
367+
dependsOn "jmhClasses"
368+
dependsOn tasks.named('testClasses')
364369
}
365370

366371
tasks.register('testWithJava17', Test) {

0 commit comments

Comments
 (0)