From 8a1698c47db14c45001f5885662c07f9af4e289d Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Tue, 17 Dec 2024 19:15:00 -0800 Subject: [PATCH] Use latest Gradle shadow plugin --- build.gradle.kts | 2 +- .../java/org/openrewrite/gradle/RewritePublishPlugin.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index c3c2b0d..4f4b5f8 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -219,7 +219,7 @@ dependencies { implementation("com.netflix.nebula:nebula-publishing-plugin:latest.release") implementation("com.netflix.nebula:nebula-project-plugin:latest.release") implementation("io.github.gradle-nexus:publish-plugin:latest.release") - implementation("gradle.plugin.com.github.johnrengelman:shadow:latest.release") + implementation("com.gradleup.shadow:com.gradleup.shadow.gradle.plugin:latest.release") implementation("org.gradle:test-retry-gradle-plugin:latest.release") implementation(platform("com.fasterxml.jackson:jackson-bom:2.17.+")) diff --git a/src/main/java/org/openrewrite/gradle/RewritePublishPlugin.java b/src/main/java/org/openrewrite/gradle/RewritePublishPlugin.java index b73682a..cf17de7 100644 --- a/src/main/java/org/openrewrite/gradle/RewritePublishPlugin.java +++ b/src/main/java/org/openrewrite/gradle/RewritePublishPlugin.java @@ -45,8 +45,8 @@ public void apply(Project project) { project.getPlugins().apply(MavenResolvedDependenciesPlugin.class); project.getPlugins().apply(MavenApacheLicensePlugin.class); - project.getPlugins().withId("com.github.johnrengelman.shadow", plugin -> - project.getPlugins().apply(MavenShadowPublishPlugin.class)); + // This plugin does not do anything if the shadow plugin is not applied, so it is safe to always apply it + project.getPlugins().apply(MavenShadowPublishPlugin.class); project.getTasks().withType(GenerateModuleMetadata.class).configureEach(task -> task.setEnabled(false));