This repository has been archived by the owner on Dec 16, 2024. It is now read-only.
generated from moderneinc/rewrite-recipe-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c801e74
commit 34c091a
Showing
17 changed files
with
4,276 additions
and
640 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,18 @@ | ||
plugins { | ||
id("org.openrewrite.build.recipe-library") version "latest.release" | ||
|
||
// Only needed when you want to apply the OpenRewriteBestPractices recipe to your recipes | ||
id("org.openrewrite.rewrite") version "latest.release" | ||
} | ||
|
||
// Set as appropriate for your organization | ||
group = "com.yourorg" | ||
description = "Rewrite recipes." | ||
group = "io.moderne" | ||
description = "Recipe layouts." | ||
|
||
dependencies { | ||
// The bom version can also be set to a specific version | ||
// https://github.com/openrewrite/rewrite-recipe-bom/releases | ||
implementation(platform("org.openrewrite.recipe:rewrite-recipe-bom:latest.release")) | ||
|
||
implementation("org.openrewrite:rewrite-java") | ||
runtimeOnly("org.openrewrite:rewrite-java-17") | ||
|
||
// Refaster style recipes need the rewrite-templating annotation processor and dependency for generated recipes | ||
// https://github.com/openrewrite/rewrite-templating/releases | ||
annotationProcessor("org.openrewrite:rewrite-templating:latest.release") | ||
implementation("org.openrewrite:rewrite-templating") | ||
// The `@BeforeTemplate` and `@AfterTemplate` annotations are needed for refaster style recipes | ||
compileOnly("com.google.errorprone:error_prone_core:2.19.1") { | ||
exclude("com.google.auto.service", "auto-service-annotations") | ||
} | ||
|
||
// Need to have a slf4j binding to see any output enabled from the parser. | ||
runtimeOnly("ch.qos.logback:logback-classic:1.2.+") | ||
|
||
// Our recipe converts Guava's `Lists` type | ||
testRuntimeOnly("com.google.guava:guava:latest.release") | ||
|
||
// Contains the OpenRewriteBestPractices recipe, which you can apply to your recipes | ||
rewrite("org.openrewrite.recipe:rewrite-recommendations:latest.release") | ||
} | ||
|
||
configure<PublishingExtension> { | ||
publications { | ||
named("nebula", MavenPublication::class.java) { | ||
suppressPomMetadataWarningsFor("runtimeElements") | ||
} | ||
} | ||
} | ||
implementation("org.openrewrite:rewrite-core") | ||
implementation("org.openrewrite.recipe:rewrite-spring") | ||
implementation("org.openrewrite.recipe:rewrite-static-analysis") | ||
|
||
publishing { | ||
repositories { | ||
maven { | ||
name = "moderne" | ||
url = uri("https://us-west1-maven.pkg.dev/moderne-dev/moderne-recipe") | ||
} | ||
} | ||
implementation("org.apache.commons:commons-text:latest.release") | ||
} |
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,229 @@ | ||
digraph G { | ||
graph [ratio=fill, | ||
size="12,5!" | ||
]; | ||
org_openrewrite_java_dependencies_UpgradeDependencyVersion [label="Upgrade Gradle or | ||
Maven dependency | ||
versions"]; | ||
org_openrewrite_java_testing_junit5_UseWiremockExtension [label="Use wiremock | ||
extension"]; | ||
org_openrewrite_java_testing_junit5_UseWiremockExtension -> org_openrewrite_java_dependencies_UpgradeDependencyVersion; | ||
org_openrewrite_java_ChangeType [label="Change type"]; | ||
org_openrewrite_java_testing_junit5_IgnoreToDisabled [label="Use JUnit Jupiter | ||
`@Disabled`"]; | ||
org_openrewrite_java_testing_junit5_IgnoreToDisabled -> org_openrewrite_java_ChangeType; | ||
org_openrewrite_java_testing_junit5_ThrowingRunnableToExecutable [label="Use JUnit Jupiter | ||
`Executable`"]; | ||
org_openrewrite_java_testing_junit5_ThrowingRunnableToExecutable -> org_openrewrite_java_ChangeType; | ||
org_openrewrite_java_testing_junit5_RemoveObsoleteRunners [label="Remove JUnit 4 | ||
`@RunWith` | ||
annotations that do | ||
not require an | ||
`@ExtendsWith` | ||
replacement"]; | ||
org_openrewrite_maven_RemovePluginDependency [label="Remove Maven plugin | ||
dependency"]; | ||
org_openrewrite_java_ChangeMethodTargetToStatic [label="Change method target | ||
to static"]; | ||
org_openrewrite_java_UseStaticImport [label="Use static import"]; | ||
org_openrewrite_java_testing_junit5_UseHamcrestAssertThat [label="Use | ||
`MatcherAssert#assertThat(..)`"]; | ||
org_openrewrite_java_testing_junit5_UseHamcrestAssertThat -> org_openrewrite_java_ChangeMethodTargetToStatic; | ||
org_openrewrite_java_testing_junit5_UseHamcrestAssertThat -> org_openrewrite_java_UseStaticImport [minlen=1]; | ||
org_openrewrite_java_dependencies_AddDependency [label="Add Gradle or Maven | ||
dependency"]; | ||
org_openrewrite_java_ReorderMethodArguments [label="Reorder method | ||
arguments"]; | ||
org_openrewrite_java_testing_junit5_MigrateAssumptions [label="Use | ||
`Assertions#assume*(..)` | ||
and Hamcrest's | ||
`MatcherAssume#assume*(..)`"]; | ||
org_openrewrite_java_testing_junit5_MigrateAssumptions -> org_openrewrite_java_ChangeType; | ||
org_openrewrite_java_testing_junit5_MigrateAssumptions -> org_openrewrite_java_ChangeMethodTargetToStatic; | ||
org_openrewrite_java_testing_junit5_MigrateAssumptions -> org_openrewrite_java_dependencies_AddDependency; | ||
org_openrewrite_java_testing_junit5_MigrateAssumptions -> org_openrewrite_java_ReorderMethodArguments; | ||
org_openrewrite_java_testing_mockito_AnyToNullable [label="Replace Mockito 1.x | ||
`anyString()`/`any()` | ||
with | ||
`nullable(Class)`"]; | ||
org_openrewrite_java_ChangeMethodName [label="Change method name"]; | ||
org_openrewrite_java_DeleteMethodArgument [label="Delete method | ||
argument"]; | ||
org_openrewrite_java_testing_mockito_CleanupMockitoImports [label="Cleanup Mockito | ||
imports"]; | ||
org_openrewrite_java_testing_mockito_MockUtilsToStatic [label="Use static form of | ||
Mockito `MockUtil`"]; | ||
org_openrewrite_java_testing_junit5_MockitoJUnitToMockitoExtension [label="JUnit 4 | ||
`MockitoJUnit` to | ||
JUnit Jupiter | ||
`MockitoExtension`"]; | ||
org_openrewrite_java_dependencies_ChangeDependency [label="Change Gradle or | ||
Maven dependency"]; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration [label="Mockito 3.x | ||
migration from 1.x (x9)"]; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_dependencies_UpgradeDependencyVersion; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeType; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeType; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeType; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_dependencies_AddDependency; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ReorderMethodArguments; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_testing_mockito_AnyToNullable [minlen=1]; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeMethodName; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeMethodName; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeMethodName; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeMethodName; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_ChangeMethodName; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_DeleteMethodArgument; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_DeleteMethodArgument; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_DeleteMethodArgument; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_DeleteMethodArgument; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_testing_mockito_CleanupMockitoImports [minlen=2]; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_testing_mockito_MockUtilsToStatic [minlen=3]; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_testing_junit5_MockitoJUnitToMockitoExtension [minlen=4]; | ||
org_openrewrite_java_testing_mockito_Mockito1to3Migration -> org_openrewrite_java_dependencies_ChangeDependency [minlen=5]; | ||
org_openrewrite_java_testing_mockito_Mockito1to4Migration [label="Mockito 4.x upgrade"]; | ||
org_openrewrite_java_testing_mockito_Mockito1to4Migration -> org_openrewrite_java_dependencies_UpgradeDependencyVersion; | ||
org_openrewrite_java_testing_mockito_Mockito1to4Migration -> org_openrewrite_java_testing_mockito_Mockito1to3Migration; | ||
org_openrewrite_java_testing_mockito_MockitoJUnitRunnerSilentToExtension [label="JUnit 4 | ||
MockitoJUnitRunner.Silent | ||
to JUnit Jupiter | ||
MockitoExtension | ||
with LENIENT | ||
settings"]; | ||
org_openrewrite_java_testing_junit5_RunnerToExtension [label="JUnit 4 `@RunWith` | ||
to JUnit Jupiter | ||
`@ExtendWith`"]; | ||
org_openrewrite_java_testing_junit5_UseMockitoExtension [label="Use Mockito JUnit | ||
Jupiter extension"]; | ||
org_openrewrite_java_testing_junit5_UseMockitoExtension -> org_openrewrite_java_testing_mockito_Mockito1to4Migration; | ||
org_openrewrite_java_testing_junit5_UseMockitoExtension -> org_openrewrite_java_testing_mockito_MockitoJUnitRunnerSilentToExtension [minlen=1]; | ||
org_openrewrite_java_testing_junit5_UseMockitoExtension -> org_openrewrite_java_testing_junit5_RunnerToExtension; | ||
org_openrewrite_java_testing_junit5_UseTestMethodOrder [label="Migrate from JUnit 4 | ||
`@FixedMethodOrder` | ||
to JUnit 5 | ||
`@TestMethodOrder`"]; | ||
org_openrewrite_java_testing_junit5_MigrateJUnitTestCase [label="Migrate JUnit 4 | ||
`TestCase` to JUnit | ||
Jupiter"]; | ||
org_openrewrite_java_testing_junit5_AssertToAssertions [label="JUnit 4 `Assert` To | ||
JUnit Jupiter | ||
`Assertions`"]; | ||
org_openrewrite_java_testing_junit5_CategoryToTag [label="JUnit 4 `@Category` | ||
to JUnit Jupiter | ||
`@Tag`"]; | ||
org_openrewrite_java_testing_junit5_CleanupJUnitImports [label="Cleanup JUnit | ||
imports"]; | ||
org_openrewrite_java_testing_junit5_TemporaryFolderToTempDir [label="Use JUnit Jupiter | ||
`@TempDir`"]; | ||
org_openrewrite_java_testing_junit5_TempDirNonFinal [label="Make `@TempDir` | ||
fields non final"]; | ||
org_openrewrite_java_testing_junit5_TestRuleToTestInfo [label="JUnit TestName @Rule | ||
to JUnit Jupiter | ||
TestInfo"]; | ||
org_openrewrite_java_testing_junit5_UpdateBeforeAfterAnnotations [label="Migrate JUnit 4 | ||
lifecycle | ||
annotations to JUnit | ||
Jupiter"]; | ||
org_openrewrite_java_testing_junit5_UpdateTestAnnotation [label="Migrate JUnit 4 | ||
`@Test` annotations | ||
to JUnit 5"]; | ||
org_openrewrite_java_testing_junit5_AddMissingTestBeforeAfterAnnotations [label="Add missing | ||
`@BeforeEach`, | ||
`@AfterEach`, | ||
`@Test` to | ||
overriding methods"]; | ||
org_openrewrite_java_testing_junit5_ParameterizedRunnerToParameterized [label="JUnit 4 | ||
`@RunWith(Parameterized.class)` | ||
to JUnit Jupiter | ||
parameterized tests"]; | ||
org_openrewrite_java_testing_junit5_JUnitParamsRunnerToParameterized [label="Pragmatists | ||
@RunWith(JUnitParamsRunner.class) | ||
to JUnit Jupiter | ||
Parameterized Tests"]; | ||
org_openrewrite_java_testing_junit5_ExpectedExceptionToAssertThrows [label="JUnit 4 | ||
`ExpectedException` | ||
To JUnit Jupiter's | ||
`assertThrows()`"]; | ||
org_openrewrite_java_testing_junit5_UpdateMockWebServer [label="OkHttp 3.x | ||
`MockWebServer` | ||
`@Rule` To 4.x | ||
`MockWebServer`"]; | ||
org_openrewrite_java_testing_junit5_UpdateMockWebServer -> org_openrewrite_java_dependencies_UpgradeDependencyVersion; | ||
org_openrewrite_java_testing_junit5_VertxUnitToVertxJunit5 [label="Use Vert.x JUnit 5 | ||
Extension"]; | ||
org_openrewrite_java_testing_junit5_VertxUnitToVertxJunit5 -> org_openrewrite_java_dependencies_AddDependency; | ||
org_openrewrite_java_testing_junit5_VertxUnitToVertxJunit5 -> org_openrewrite_java_testing_junit5_RunnerToExtension; | ||
org_openrewrite_java_testing_junit5_EnclosedToNested [label="JUnit 4 | ||
`@RunWith(Enclosed.class)` | ||
to JUnit Jupiter | ||
`@Nested`"]; | ||
org_openrewrite_java_testing_junit5_AddMissingNested [label="JUnit 5 inner test | ||
classes should be | ||
annotated with | ||
`@Nested`"]; | ||
org_openrewrite_java_testing_hamcrest_AddHamcrestIfUsed [label="Add | ||
`org.hamcrest:hamcrest` | ||
if it is used."]; | ||
org_openrewrite_java_testing_hamcrest_AddHamcrestIfUsed -> org_openrewrite_java_dependencies_AddDependency; | ||
org_openrewrite_maven_ChangeDependencyGroupIdAndArtifactId [label="Change Maven | ||
dependency"]; | ||
org_openrewrite_java_testing_junit5_UseXMLUnitLegacy [label="Use XMLUnit Legacy | ||
for JUnit 5"]; | ||
org_openrewrite_java_testing_junit5_UseXMLUnitLegacy -> org_openrewrite_maven_ChangeDependencyGroupIdAndArtifactId [minlen=1]; | ||
org_openrewrite_gradle_RemoveDependency [label="Remove a Gradle | ||
dependency"]; | ||
org_openrewrite_maven_RemoveDependency [label="Remove Maven | ||
dependency"]; | ||
org_openrewrite_java_dependencies_RemoveDependency [label="Remove a Gradle or | ||
Maven dependency"]; | ||
org_openrewrite_java_dependencies_RemoveDependency -> org_openrewrite_gradle_RemoveDependency; | ||
org_openrewrite_java_dependencies_RemoveDependency -> org_openrewrite_gradle_RemoveDependency; | ||
org_openrewrite_java_dependencies_RemoveDependency -> org_openrewrite_maven_RemoveDependency; | ||
org_openrewrite_java_dependencies_RemoveDependency -> org_openrewrite_maven_RemoveDependency; | ||
org_openrewrite_maven_ExcludeDependency [label="Exclude Maven | ||
dependency"]; | ||
org_openrewrite_maven_RemoveExclusion [label="Remove exclusion"]; | ||
org_openrewrite_maven_UpgradePluginVersion [label="Upgrade Maven plugin | ||
version"]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration [label="JUnit Jupiter | ||
migration from JUnit | ||
4.x (x2)"]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UseWiremockExtension; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_IgnoreToDisabled; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_ThrowingRunnableToExecutable; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_RemoveObsoleteRunners [minlen=1]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_maven_RemovePluginDependency [minlen=2]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UseHamcrestAssertThat; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_dependencies_AddDependency; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_MigrateAssumptions; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_ChangeMethodName; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UseMockitoExtension; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UseTestMethodOrder [minlen=3]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_MigrateJUnitTestCase [minlen=4]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_AssertToAssertions [minlen=5]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_CategoryToTag [minlen=6]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_CleanupJUnitImports [minlen=7]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_TemporaryFolderToTempDir [minlen=8]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_TempDirNonFinal [minlen=9]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_TestRuleToTestInfo [minlen=10]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UpdateBeforeAfterAnnotations [minlen=11]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UpdateTestAnnotation [minlen=12]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_AddMissingTestBeforeAfterAnnotations [minlen=13]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_ParameterizedRunnerToParameterized [minlen=14]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_JUnitParamsRunnerToParameterized [minlen=15]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_ExpectedExceptionToAssertThrows [minlen=16]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UpdateMockWebServer; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_VertxUnitToVertxJunit5; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_EnclosedToNested [minlen=17]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_AddMissingNested [minlen=18]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_hamcrest_AddHamcrestIfUsed; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_testing_junit5_UseXMLUnitLegacy; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_dependencies_RemoveDependency; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_java_dependencies_RemoveDependency; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_maven_ExcludeDependency; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_maven_ExcludeDependency; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_maven_RemoveExclusion [minlen=19]; | ||
org_openrewrite_java_testing_junit5_JUnit4to5Migration -> org_openrewrite_maven_UpgradePluginVersion [minlen=20]; | ||
org_openrewrite_config_CompositeRecipe [label="org.openrewrite.config.CompositeRecipe"]; | ||
org_openrewrite_config_CompositeRecipe -> org_openrewrite_java_testing_junit5_JUnit4to5Migration [minlen=1]; | ||
} |
Oops, something went wrong.