Skip to content

Commit cae534d

Browse files
committed
Configure OpenRewrite plugin
Run with: ./gradlew rewriteRun --no-parallel
1 parent d8a62f8 commit cae534d

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

gradle/libs.versions.toml

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ foojayResolver = { id = "org.gradle.toolchains.foojay-resolver", version = "0.9.
9999
gitPublish = { id = "org.ajoberstar.git-publish", version = "5.1.0" }
100100
jmh = { id = "me.champeau.jmh", version = "0.7.3" }
101101
nexusPublish = { id = "io.github.gradle-nexus.publish-plugin", version = "2.0.0" }
102+
openrewrite = { id = "org.openrewrite.rewrite", version = "7.1.7" }
102103
plantuml = { id = "io.freefair.plantuml", version = "8.12.2.1" }
103104
shadow = { id = "com.gradleup.shadow", version = "8.3.6" }
104105
spotless = { id = "com.diffplug.spotless", version = "6.25.0" }

gradle/plugins/common/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies {
1010
implementation(libs.plugins.develocity.markerCoordinates)
1111
implementation(libs.plugins.foojayResolver.markerCoordinates)
1212
implementation(libs.plugins.jmh.markerCoordinates)
13+
implementation(libs.plugins.openrewrite.markerCoordinates)
1314
implementation(libs.plugins.shadow.markerCoordinates)
1415
implementation(libs.plugins.spotless.markerCoordinates)
1516
implementation(libs.plugins.versions.markerCoordinates)

gradle/plugins/common/src/main/kotlin/junitbuild.java-library-conventions.gradle.kts

+10
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@ plugins {
1414
id("junitbuild.build-parameters")
1515
id("junitbuild.checkstyle-conventions")
1616
id("junitbuild.jacoco-java-conventions")
17+
id("org.openrewrite.rewrite")
18+
}
19+
20+
rewrite {
21+
activeRecipe("org.openrewrite.java.migrate.UpgradeToJava17")
22+
}
23+
24+
dependencies {
25+
rewrite(platform("org.openrewrite.recipe:rewrite-recipe-bom:latest.release"))
26+
rewrite("org.openrewrite.recipe:rewrite-migrate-java")
1727
}
1828

1929
val mavenizedProjects: List<Project> by rootProject.extra

0 commit comments

Comments
 (0)