1- plugins {
2- id(" groovy" )
3- `java- gradle- plugin`
4- id(" org.gradlex.internal.plugin-publish-conventions" ) version " 0.6"
5- }
6-
7- group = " org.gradlex"
81version = " 1.13.1"
92
10- java {
11- toolchain.languageVersion = JavaLanguageVersion .of(11 )
12- }
13-
14- dependencies {
15- implementation(" org.ow2.asm:asm:9.9" )
3+ dependencies { implementation(" org.ow2.asm:asm:9.9" ) }
164
17- testImplementation(" org.spockframework:spock-core:2.3-groovy-4.0" ) {
18- exclude(group = " org.codehaus.groovy" )
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" )
1911 }
20- testRuntimeOnly(" org.junit.platform:junit-platform-launcher" )
21- }
22-
23- pluginPublishConventions {
24- id(" ${project.group} .${project.name} " )
25- implementationClass(" org.gradlex.javamodule.moduleinfo.ExtraJavaModuleInfoPlugin" )
26- displayName(" Extra Java Module Info Gradle Plugin" )
27- description(" Add module information to legacy Java libraries." )
28- tags(" gradlex" , " java" , " modularity" , " jigsaw" , " jpms" )
2912 gitHub(" https://github.com/gradlex-org/extra-java-module-info" )
3013 developer {
3114 id.set(" jjohannes" )
@@ -34,31 +17,12 @@ pluginPublishConventions {
3417 }
3518}
3619
37- tasks.named<Test >(" test" ) {
38- description = " Runs tests against the Gradle version the plugin is built with"
39- }
20+ testingConventions { testGradleVersions(" 6.8.3" , " 6.9.4" , " 7.6.5" , " 8.14.2" ) }
4021
41- listOf (" 6.8.3" , " 6.9.4" , " 7.6.5" , " 8.14.2" ).forEach { gradleVersionUnderTest ->
42- val testGradle = tasks.register<Test >(" testGradle$gradleVersionUnderTest " ) {
43- description = " Runs tests against Gradle $gradleVersionUnderTest "
44- systemProperty(" gradleVersionUnderTest" , gradleVersionUnderTest)
45- }
46- tasks.check {
47- dependsOn(testGradle)
48- }
49- }
22+ // === the following custom configuration should be removed once tests are migrated to Java
23+ apply (plugin = " groovy" )
5024
51- tasks.withType<Test >().configureEach {
52- group = " verification"
53- classpath = sourceSets.test.get().runtimeClasspath
54- testClassesDirs = sourceSets.test.get().output.classesDirs
55- useJUnitPlatform()
56- maxParallelForks = 4
25+ tasks.named<GroovyCompile >(" compileTestGroovy" ) { targetCompatibility = " 11" } // allow tests to run against 6.x
5726
58- val gradleMajorVersion = (systemProperties[" gradleVersionUnderTest" ] as String? ? : gradle.gradleVersion).split(" ." )[0 ].toInt()
59- if (gradleMajorVersion >= 7 ) {
60- javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion .of(17 ) }
61- } else {
62- javaLauncher = javaToolchains.launcherFor { languageVersion = JavaLanguageVersion .of(11 ) }
63- }
64- }
27+ dependencies { testImplementation(" org.spockframework:spock-core:2.3-groovy-4.0" ) } //
28+ // ====================================================================================
0 commit comments