Skip to content

Commit e8de085

Browse files
committed
Merge remote-tracking branch 'upstream/main' into configurationprovider-lookup-change
2 parents 2c4dcad + a50973f commit e8de085

26 files changed

+2445
-627
lines changed

.gitattributes

Lines changed: 0 additions & 9 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Dependency Submission
2+
3+
on: [ push ]
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
dependency-submission:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v5
13+
- uses: gradle/actions/dependency-submission@v5
14+
with:
15+
build-scan-publish: true
16+
build-scan-terms-of-use-url: "https://gradle.com/help/legal-terms-of-use"
17+
build-scan-terms-of-use-agree: "yes"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ This needs to be done in all subprojects. You use the `versionsProvidingConfigur
219219
```kotlin
220220
extraJavaModuleInfo {
221221
versionsProvidingConfiguration = project.provider { project.configurations.named("mainRuntimeClasspath").get() }
222+
// or for older Gradle/Kotlin versions
223+
// versionsProvidingConfiguration.set(project.provider { project.configurations.named("mainRuntimeClasspath").get() })
222224
}
223225
```
224226

build.gradle.kts

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,14 @@
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"
81
version = "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+
// ====================================================================================

gradle/checkstyle/checkstyle.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

gradle/checkstyle/header.txt

Lines changed: 0 additions & 15 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
toolchainVersion=17

0 commit comments

Comments
 (0)