Skip to content

Commit

Permalink
Don't fail for directories while unpacking webjars
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer committed Nov 19, 2018
1 parent cbbd40c commit 8f911b9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import org.gradle.api.tasks.OutputDirectory;
import org.gradle.api.tasks.TaskAction;

import java.io.File;

@Getter
@Setter
public class PrepareWebjars extends DefaultTask {
Expand All @@ -27,7 +29,7 @@ public void extractWebjars() {

sync.setDuplicatesStrategy(DuplicatesStrategy.WARN);

webjars.getFiles().forEach(file ->
webjars.filter(File::isFile).getFiles().forEach(file ->
sync.from(getProject().zipTree(file), jarSpec -> {
jarSpec.include("META-INF/resources/webjars/**");
jarSpec.setIncludeEmptyDirs(false);
Expand Down

0 comments on commit 8f911b9

Please sign in to comment.