Skip to content

Commit d74fc48

Browse files
committed
Migrate build to shared convention plugins setup
1 parent 57ecad4 commit d74fc48

File tree

4 files changed

+4
-78
lines changed

4 files changed

+4
-78
lines changed

build.gradle.kts

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
plugins {
2-
id("groovy")
3-
id("org.gradlex.internal.plugin-publish-conventions") version "0.6"
4-
}
1+
plugins { id("groovy") } // tests not yet migrated to Java
52

6-
group = "org.gradlex"
73
version = "1.13.1"
84

9-
java {
10-
toolchain.languageVersion = JavaLanguageVersion.of(17)
11-
sourceCompatibility = JavaVersion.VERSION_1_8
12-
targetCompatibility = JavaVersion.VERSION_1_8
13-
}
14-
155
dependencies {
166
implementation("org.ow2.asm:asm:9.9")
177

@@ -33,27 +23,6 @@ pluginPublishConventions {
3323
}
3424
}
3525

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-
}
26+
tasks.compileTestGroovy { targetCompatibility = "11" } // allow tests to run against 6.x
4227

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-
}
28+
testingConventions { testGradleVersions("6.8.3", "6.9.4", "7.6.5", "8.14.2") }

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.

settings.gradle.kts

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1 @@
1-
plugins {
2-
id("com.gradle.develocity") version "4.2.2"
3-
}
4-
5-
rootProject.name = "extra-java-module-info"
6-
7-
dependencyResolutionManagement {
8-
repositories.mavenCentral()
9-
}
10-
11-
develocity {
12-
buildScan {
13-
val isCi = providers.environmentVariable("CI").getOrElse("false").toBoolean()
14-
if (isCi) {
15-
termsOfUseUrl = "https://gradle.com/help/legal-terms-of-use"
16-
termsOfUseAgree = "yes"
17-
} else {
18-
publishing.onlyIf { false }
19-
}
20-
}
21-
}
1+
plugins { id("org.gradlex.internal.gradlex-build-conventions") version "0.7" }

0 commit comments

Comments
 (0)