diff --git a/src/main/resources/META-INF/rewrite/java-version-17.yml b/src/main/resources/META-INF/rewrite/java-version-17.yml
index b664ae1a13..686737f57f 100644
--- a/src/main/resources/META-INF/rewrite/java-version-17.yml
+++ b/src/main/resources/META-INF/rewrite/java-version-17.yml
@@ -45,10 +45,6 @@ recipeList:
groupId: org.apache.maven.plugins
artifactId: maven-checkstyle-plugin
newVersion: 3.x
- - org.openrewrite.java.dependencies.UpgradeDependencyVersion:
- groupId: org.projectlombok
- artifactId: lombok
- newVersion: 1.18.22
- org.openrewrite.maven.UpgradePluginVersion:
groupId: com.sonatype.clm
artifactId: clm-maven-plugin
diff --git a/src/main/resources/META-INF/rewrite/java-version-21.yml b/src/main/resources/META-INF/rewrite/java-version-21.yml
index 9a26cc9513..bf17274439 100644
--- a/src/main/resources/META-INF/rewrite/java-version-21.yml
+++ b/src/main/resources/META-INF/rewrite/java-version-21.yml
@@ -32,10 +32,13 @@ recipeList:
- org.openrewrite.java.migrate.util.UseLocaleOf
- org.openrewrite.staticanalysis.ReplaceDeprecatedRuntimeExecMethods
- org.openrewrite.github.SetupJavaUpgradeJavaVersion
+ # GitHub Actions bump needs Gradle Wrapper bump too https://docs.gradle.org/current/userguide/compatibility.html#java
+ - org.openrewrite.gradle.UpdateGradleWrapper:
+ version: 8.5
- org.openrewrite.maven.UpgradePluginVersion:
groupId: org.jacoco
artifactId: jacoco-maven-plugin
- newVersion: 0.8.11
+ newVersion: 0.8.+
- org.openrewrite.maven.UpgradePluginVersion:
groupId: com.sonatype.clm
artifactId: clm-maven-plugin
diff --git a/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java b/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java
index 336e56fcea..e48ff81a15 100644
--- a/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java
+++ b/src/test/java/org/openrewrite/java/migrate/UpgradeToJava17Test.java
@@ -22,6 +22,8 @@
import org.openrewrite.test.RecipeSpec;
import org.openrewrite.test.RewriteTest;
+import java.util.regex.Pattern;
+
import static org.assertj.core.api.Assertions.assertThat;
import static org.openrewrite.java.Assertions.*;
import static org.openrewrite.maven.Assertions.pomXml;
@@ -483,4 +485,46 @@ private static void agentmain(String agentArgs, String inst) {
), 17)
);
}
+
+ @Test
+ void lombokBumpedGoingTo17() {
+ rewriteRun(
+ //language=xml
+ pomXml(
+ """
+
+ 4.0.0
+ com.mycompany.app
+ my-app
+ 1
+
+
+ org.projectlombok
+ lombok
+ 1.16.22
+
+
+
+ """,
+ spec -> spec.after(actual ->
+ """
+
+ 4.0.0
+ com.mycompany.app
+ my-app
+ 1
+
+
+ org.projectlombok
+ lombok
+ %s
+
+
+
+ """.formatted(Pattern.compile("(1\\.18.*)")
+ .matcher(actual).results().findFirst().orElseThrow().group(1))
+ )
+ )
+ );
+ }
}