Skip to content

Commit

Permalink
Stream -> loop
Browse files Browse the repository at this point in the history
  • Loading branch information
avaruus1 committed May 26, 2024
1 parent e263e91 commit c7afa6b
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,15 @@ public void execute(final Task a) {

this.project.afterEvaluate(p -> {
final TaskProvider<AbstractArchiveTask> archiveTask;
if (Constants.Plugins.SHADOW_PLUGIN_IDS.stream().anyMatch(id -> p.getPlugins().hasPlugin(id))) {

boolean hasShadow = false;
for (String id : Constants.Plugins.SHADOW_PLUGIN_IDS) {
if (p.getPlugins().hasPlugin(id)) {
hasShadow = true;
break;
}
}
if (hasShadow) {
archiveTask = p.getTasks().named(Constants.Plugins.SHADOW_JAR_TASK_NAME, AbstractArchiveTask.class);
} else {
archiveTask = p.getTasks().named(JavaPlugin.JAR_TASK_NAME, AbstractArchiveTask.class);
Expand Down

0 comments on commit c7afa6b

Please sign in to comment.