diff --git a/build.gradle.kts b/build.gradle.kts index ff7efd3..a5d3d67 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,20 @@ dependencyCheck { group = "org.openrewrite.recipe" description = "Third-party maintained OpenRewrite recipes" +recipeDependencies { + parserClasspath("org.junit.jupiter:junit-jupiter-api:5.+") + parserClasspath("org.assertj:assertj-core:latest.release") + parserClasspath("org.springframework:spring-context:5.3.+") + parserClasspath("org.springframework:spring-test:5.3.+") + parserClasspath("org.springframework:spring-web:5.3.+") + parserClasspath("org.springframework:spring-webflux:5.3.+") + parserClasspath("org.testng:testng:7.5") + parserClasspath("io.projectreactor:reactor-core:latest.release") + parserClasspath("io.projectreactor:reactor-test:latest.release") + parserClasspath("io.projectreactor.addons:reactor-adapter:latest.release") + parserClasspath("io.projectreactor.addons:reactor-extra:latest.release") +} + val rewriteVersion = rewriteRecipe.rewriteVersion.get() dependencies { implementation(platform("org.openrewrite:rewrite-bom:$rewriteVersion")) @@ -37,20 +51,6 @@ dependencies { runtimeOnly("software.amazon.awssdk:v2-migration:latest.release") runtimeOnly("tech.picnic.error-prone-support:error-prone-contrib:${rewriteVersion}:recipes") - // error-prone-contrib only has provided dependencies, whereas the platform needs these on the classpath at runtime - runtimeOnly("org.junit.jupiter:junit-jupiter-api:5.+") - runtimeOnly("org.assertj:assertj-core:latest.release") - runtimeOnly(platform("org.springframework:spring-framework-bom:5.3.39")) // Necessary for Java 8 compatibility - runtimeOnly("org.springframework:spring-context") - runtimeOnly("org.springframework:spring-test") - runtimeOnly("org.springframework:spring-web") - runtimeOnly("org.springframework:spring-webflux") - runtimeOnly("org.testng:testng:7.5") - runtimeOnly("io.projectreactor:reactor-core:latest.release") - runtimeOnly("io.projectreactor:reactor-test:latest.release") - runtimeOnly("io.projectreactor.addons:reactor-adapter:latest.release") - runtimeOnly("io.projectreactor.addons:reactor-extra:latest.release") - testImplementation("org.openrewrite:rewrite-java") testImplementation("org.openrewrite:rewrite-test") diff --git a/src/main/resources/META-INF/rewrite/classpath.tsv.zip b/src/main/resources/META-INF/rewrite/classpath.tsv.zip new file mode 100644 index 0000000..1161f12 Binary files /dev/null and b/src/main/resources/META-INF/rewrite/classpath.tsv.zip differ