diff --git a/plugin-development/src/main/java/org/spongepowered/gradle/common/Constants.java b/plugin-development/src/main/java/org/spongepowered/gradle/common/Constants.java index b12c7de..1cef3db 100644 --- a/plugin-development/src/main/java/org/spongepowered/gradle/common/Constants.java +++ b/plugin-development/src/main/java/org/spongepowered/gradle/common/Constants.java @@ -24,6 +24,10 @@ */ package org.spongepowered.gradle.common; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + public final class Constants { public static final String NAME = "SpongeGradle"; @@ -48,7 +52,10 @@ private Dependencies() { } public static final class Plugins { - public static final String SHADOW_PLUGIN_ID = "com.github.johnrengelman.shadow"; + public static final List SHADOW_PLUGIN_IDS = Collections.unmodifiableList(Arrays.asList( + "com.github.johnrengelman.shadow", + "io.github.goooler.shadow" + )); public static final String SHADOW_JAR_TASK_NAME = "shadowJar"; private Plugins() { diff --git a/plugin-development/src/main/java/org/spongepowered/gradle/plugin/SpongePluginGradle.java b/plugin-development/src/main/java/org/spongepowered/gradle/plugin/SpongePluginGradle.java index d19329f..a692cc8 100644 --- a/plugin-development/src/main/java/org/spongepowered/gradle/plugin/SpongePluginGradle.java +++ b/plugin-development/src/main/java/org/spongepowered/gradle/plugin/SpongePluginGradle.java @@ -279,7 +279,7 @@ public void execute(final Task a) { this.project.afterEvaluate(p -> { final TaskProvider archiveTask; - if (p.getPlugins().hasPlugin(Constants.Plugins.SHADOW_PLUGIN_ID)) { + if (Constants.Plugins.SHADOW_PLUGIN_IDS.stream().anyMatch(id -> p.getPlugins().hasPlugin(id))) { archiveTask = p.getTasks().named(Constants.Plugins.SHADOW_JAR_TASK_NAME, AbstractArchiveTask.class); } else { archiveTask = p.getTasks().named(JavaPlugin.JAR_TASK_NAME, AbstractArchiveTask.class);