Skip to content

Commit f23fffd

Browse files
committed
Fix plugin tests not running after upgrade to gradle 7
1 parent f2aec4b commit f23fffd

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

gradle-plugin/build.gradle.kts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,20 @@ plugins {
1010
apply(from = "groovy.gradle")
1111

1212
dependencies {
13+
testImplementation(platform("org.spockframework:spock-bom:2.0-groovy-3.0"))
14+
testImplementation("org.spockframework:spock-core")
15+
testImplementation("org.spockframework:spock-junit4")
16+
testImplementation("junit:junit:4.13.2")
17+
1318
val lombok = "org.projectlombok:lombok:1.18.20"
1419
compileOnly(lombok)
1520
testCompileOnly(lombok)
1621
annotationProcessor(lombok)
1722
testAnnotationProcessor(lombok)
1823
}
24+
25+
tasks.withType<Test>().configureEach {
26+
// Using JUnitPlatform for running tests
27+
useJUnitPlatform()
28+
}
29+

gradle-plugin/groovy.gradle

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,6 @@ shadowJar {
2222
dependencies {
2323
//compileOnly 'com.google.guava:guava:25.1-jre' // bundled with gradle
2424
implementation parent
25-
testImplementation('org.spockframework:spock-core:2.0-groovy-3.0') {
26-
exclude module: 'groovy-all'
27-
}
28-
testImplementation('org.spockframework:spock-junit4:2.0-groovy-3.0') {
29-
exclude module: 'groovy-all'
30-
}
3125
testImplementation('io.github.classgraph:classgraph:4.8.59')
3226
}
3327

gradle-plugin/src/test/groovy/dev/minco/test/BuildLogicFunctionalTest.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class BuildLogicFunctionalTest extends Specification {
5959
where:
6060
gradleVersion | maxJdkVersion
6161
null | null
62+
// JDK 16
63+
"7.1.1" | JavaVersion.VERSION_16
6264
// first version with JDK 15 support
6365
"6.7.1" | JavaVersion.VERSION_15
6466
// first version with working @Nested in a managed type

0 commit comments

Comments
 (0)