From 2f959ef38532af37e1d30d598057dd1460833dc9 Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Tue, 16 Apr 2024 21:01:25 -0700 Subject: [PATCH] Use version of dependency manipulation recipe which works for both Gradle and Maven --- build.gradle.kts | 1 - src/main/resources/META-INF/rewrite/swagger-2.yml | 6 +++--- .../openrewrite/openapi/swagger/SwaggerToOpenAPITest.java | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index b7d5d1c..fabd831 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,6 @@ dependencies { testImplementation("org.openrewrite:rewrite-test") testImplementation("org.openrewrite:rewrite-gradle") testImplementation("org.openrewrite:rewrite-maven") - testImplementation("org.openrewrite:rewrite-core") testImplementation("org.junit.jupiter:junit-jupiter-engine:latest.release") diff --git a/src/main/resources/META-INF/rewrite/swagger-2.yml b/src/main/resources/META-INF/rewrite/swagger-2.yml index c6e118e..f2603e0 100644 --- a/src/main/resources/META-INF/rewrite/swagger-2.yml +++ b/src/main/resources/META-INF/rewrite/swagger-2.yml @@ -23,17 +23,17 @@ tags: - openapi recipeList: # Relocated artifacts https://mvnrepository.com/artifact/io.swagger - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + - org.openrewrite.java.dependencies.ChangeDependencyGroupIdAndArtifactId: oldGroupId: io.swagger oldArtifactId: swagger-annotations newGroupId: io.swagger.core.v3 newVersion: 2.2.x - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + - org.openrewrite.java.dependencies.ChangeDependencyGroupIdAndArtifactId: oldGroupId: io.swagger oldArtifactId: swagger-core newGroupId: io.swagger.core.v3 newVersion: 2.2.x - - org.openrewrite.maven.ChangeDependencyGroupIdAndArtifactId: + - org.openrewrite.java.dependencies.ChangeDependencyGroupIdAndArtifactId: oldGroupId: io.swagger oldArtifactId: swagger-models newGroupId: io.swagger.core.v3 diff --git a/src/test/java/org/openrewrite/openapi/swagger/SwaggerToOpenAPITest.java b/src/test/java/org/openrewrite/openapi/swagger/SwaggerToOpenAPITest.java index 7ed7a83..784b280 100644 --- a/src/test/java/org/openrewrite/openapi/swagger/SwaggerToOpenAPITest.java +++ b/src/test/java/org/openrewrite/openapi/swagger/SwaggerToOpenAPITest.java @@ -48,7 +48,7 @@ void shouldChangeSwaggerArtifacts() { package example.org; import io.swagger.annotations.ApiModel; - + @ApiModel class Example { } """, @@ -56,7 +56,7 @@ class Example { } package example.org; import io.swagger.v3.oas.annotations.media.Schema; - + @Schema class Example { } """