-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent OpenRewrite from adding unwanted dependencies to jakarta-anno…
…tations * Would be added by org.openrewrite.java.migrate.javax.AddCommonAnnotationsDependencies via UpgradeToJava21 * See openrewrite/rewrite#4211
- Loading branch information
Showing
2 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: net.incongru.tichu.rewrite.RecipeBook | ||
recipeList: | ||
- org.openrewrite.java.migrate.UpgradeToJava21 | ||
- org.openrewrite.java.migrate.guava.NoGuavaJava21 | ||
- net.incongru.tichu.rewrite.RemoveJakartaAnnotationDependency | ||
|
||
--- | ||
type: specs.openrewrite.org/v1beta/recipe | ||
name: net.incongru.tichu.rewrite.RemoveJakartaAnnotationDependency | ||
description: | | ||
Somewhere in the depths of UpgradeToJava21 via Java8toJava11, | ||
dependencies to jakarta.annotation:jakarta.annotation-api are | ||
added because we use javax.annotation..*. Except, we only use | ||
@Nonnull and @Nullable, which are _not_ in this jar. Since | ||
individual recipes can't be disabled when they're declared | ||
within others, here's a recipe that does the inverse. | ||
See https://github.com/openrewrite/rewrite/discussions/4211 | ||
recipeList: | ||
- org.openrewrite.java.dependencies.RemoveDependency: | ||
groupId: jakarta.annotation | ||
artifactId: jakarta.annotation-api |