File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
plugin-development/src/main/java/org/spongepowered/gradle Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 2424 */
2525package org .spongepowered .gradle .common ;
2626
27+ import java .util .Arrays ;
28+ import java .util .Collections ;
29+ import java .util .List ;
30+
2731public final class Constants {
2832
2933 public static final String NAME = "SpongeGradle" ;
@@ -48,7 +52,10 @@ private Dependencies() {
4852 }
4953
5054 public static final class Plugins {
51- public static final String SHADOW_PLUGIN_ID = "com.github.johnrengelman.shadow" ;
55+ public static final List <String > SHADOW_PLUGIN_IDS = Collections .unmodifiableList (Arrays .asList (
56+ "com.github.johnrengelman.shadow" ,
57+ "io.github.goooler.shadow"
58+ ));
5259 public static final String SHADOW_JAR_TASK_NAME = "shadowJar" ;
5360
5461 private Plugins () {
Original file line number Diff line number Diff line change @@ -279,7 +279,7 @@ public void execute(final Task a) {
279279
280280 this .project .afterEvaluate (p -> {
281281 final TaskProvider <AbstractArchiveTask > archiveTask ;
282- if (p .getPlugins ().hasPlugin (Constants . Plugins . SHADOW_PLUGIN_ID )) {
282+ if (Constants . Plugins . SHADOW_PLUGIN_IDS . stream (). anyMatch ( id -> p .getPlugins ().hasPlugin (id ) )) {
283283 archiveTask = p .getTasks ().named (Constants .Plugins .SHADOW_JAR_TASK_NAME , AbstractArchiveTask .class );
284284 } else {
285285 archiveTask = p .getTasks ().named (JavaPlugin .JAR_TASK_NAME , AbstractArchiveTask .class );
You can’t perform that action at this time.
0 commit comments