From a18d2bc15e7aeb8dd330bf314e397e04a71413de Mon Sep 17 00:00:00 2001 From: Tim te Beek Date: Thu, 15 Feb 2024 23:14:56 +0100 Subject: [PATCH] Use shadow to unpack recipes --- build.gradle.kts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 4fb9a26..c5475a5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,8 @@ +import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar + plugins { id("org.openrewrite.build.recipe-library") version "latest.release" + id("com.github.johnrengelman.shadow") version "latest.release" } group = "org.openrewrite.recipe" @@ -9,13 +12,22 @@ val rewriteVersion = rewriteRecipe.rewriteVersion.get() dependencies { implementation(platform("org.openrewrite:rewrite-bom:$rewriteVersion")) - implementation("org.openrewrite:rewrite-java") - implementation("org.openrewrite:rewrite-templating:${rewriteVersion}") - implementation("tech.picnic.error-prone-support:error-prone-contrib:latest.release") + runtimeOnly("org.openrewrite:rewrite-java") + runtimeOnly("org.openrewrite:rewrite-templating:${rewriteVersion}") + runtimeOnly("tech.picnic.error-prone-support:error-prone-contrib:latest.release") - testImplementation("org.openrewrite:rewrite-java-17") + testImplementation("org.openrewrite:rewrite-java") testImplementation("org.openrewrite:rewrite-test") + testImplementation("tech.picnic.error-prone-support:error-prone-contrib:latest.release") testImplementation("org.junit.jupiter:junit-jupiter-engine:latest.release") + testRuntimeOnly("org.openrewrite:rewrite-java-17") testRuntimeOnly("org.gradle:gradle-tooling-api:latest.release") } + +tasks.withType { + archiveClassifier.set("") + dependencies { + include(dependency("tech.picnic.error-prone-support:error-prone-contrib")) + } +}