openrewrite / rewrite-jenkins

OpenRewrite recipes to continuously modernize Jenkins plugins.
Apache License 2.0
9 stars 8 forks source link

Remove dependency on `symbol-annotation` #39

Closed basil closed 1 year ago

basil commented 1 year ago

Fixes #27 by removing the dependency on symbol-annotation. We do this only for the org.openrewrite.jenkins.ModernizePlugin recipe and not the org.openrewrite.jenkins.ModernizePluginForJava8 recipe because the latter only bumps the core version up to 2.346.3, and a recent version of symbol-annotation is only delivered by core as of 2.349. We tested this by running org.openrewrite.jenkins.ModernizePlugin against jenkinsci/artifact-repository-parameter-plugin@b0a0a4e and verifying that the symbol-annotation dependency was successfully removed. We did not add any test coverage in this repository because org.openrewrite.java.RemoveDependency is upstream functionality that is already tested upstream, and similar usages in this repository (e.g., the usage of org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId to change mockito-inline to mockito-core a few lines above this change) don't have test coverage in this repository either.

sghill commented 1 year ago

Thanks for the PR!

Once enhancement we can make later is to check the Jenkins version is >= 2.349 so it can be run standalone as well.