1- plugins {
2- id(" groovy" )
3- id(" org.gradlex.internal.plugin-publish-conventions" ) version " 0.6"
4- }
5-
6- group = " org.gradlex"
71version = " 1.13.1"
82
9- java {
10- toolchain.languageVersion = JavaLanguageVersion .of(17 )
11- sourceCompatibility = JavaVersion .VERSION_1_8
12- targetCompatibility = JavaVersion .VERSION_1_8
13- }
14-
15- dependencies {
16- implementation(" org.ow2.asm:asm:9.9" )
3+ dependencies { implementation(" org.ow2.asm:asm:9.9" ) }
174
18- testImplementation(" org.spockframework:spock-core:2.3-groovy-4.0" )
19- testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
20- }
21-
22- pluginPublishConventions {
23- id(" ${project.group} .${project.name} " )
24- implementationClass(" org.gradlex.javamodule.moduleinfo.ExtraJavaModuleInfoPlugin" )
25- displayName(" Extra Java Module Info Gradle Plugin" )
26- description(" Add module information to legacy Java libraries." )
27- tags(" gradlex" , " java" , " modularity" , " jigsaw" , " jpms" )
5+ publishingConventions {
6+ pluginPortal(" ${project.group} .${project.name} " ) {
7+ implementationClass(" org.gradlex.javamodule.moduleinfo.ExtraJavaModuleInfoPlugin" )
8+ displayName(" Extra Java Module Info Gradle Plugin" )
9+ description(" Add module information to legacy Java libraries." )
10+ tags(" gradlex" , " java" , " modularity" , " jigsaw" , " jpms" )
11+ }
2812 gitHub(" https://github.com/gradlex-org/extra-java-module-info" )
2913 developer {
3014 id.set(" jjohannes" )
@@ -33,27 +17,12 @@ pluginPublishConventions {
3317 }
3418}
3519
36- tasks.test {
37- description = " Runs tests against the Gradle version the plugin is built with"
38- classpath = sourceSets.test.get().runtimeClasspath
39- useJUnitPlatform()
40- maxParallelForks = 4
41- }
20+ testingConventions { testGradleVersions(" 6.8.3" , " 6.9.4" , " 7.6.5" , " 8.14.2" ) }
4221
43- listOf (" 6.8.3" , " 6.9.4" , " 7.6.5" , " 8.14.2" ).forEach { gradleVersionUnderTest ->
44- val testGradle = tasks.register<Test >(" testGradle$gradleVersionUnderTest " ) {
45- group = " verification"
46- description = " Runs tests against Gradle $gradleVersionUnderTest "
47- testClassesDirs = sourceSets.test.get().output.classesDirs
48- classpath = sourceSets.test.get().runtimeClasspath
49- useJUnitPlatform()
50- maxParallelForks = 4
51- systemProperty(" gradleVersionUnderTest" , gradleVersionUnderTest)
52- if (gradleVersionUnderTest.startsWith(" 6" )) {
53- javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion .of(11 ) }
54- }
55- }
56- tasks.check {
57- dependsOn(testGradle)
58- }
59- }
22+ // === the following custom configuration should be removed once tests are migrated to Java
23+ apply (plugin = " groovy" )
24+
25+ tasks.named<GroovyCompile >(" compileTestGroovy" ) { targetCompatibility = " 11" } // allow tests to run against 6.x
26+
27+ dependencies { testImplementation(" org.spockframework:spock-core:2.3-groovy-4.0" ) } //
28+ // ====================================================================================
0 commit comments