|
29 | 29 | import java.util.concurrent.ExecutorService;
|
30 | 30 | import java.util.concurrent.Executors;
|
31 | 31 | import java.util.concurrent.TimeUnit;
|
| 32 | +import java.util.function.Predicate; |
32 | 33 | import java.util.stream.Collectors;
|
33 | 34 | import java.util.stream.Stream;
|
34 | 35 |
|
@@ -609,20 +610,21 @@ private void extractSource() throws IOException {
|
609 | 610 |
|
610 | 611 | // extract remaining files
|
611 | 612 | extractFiles(
|
612 |
| - filesToExtract, extractedFiles, defaultExtractor, customExtractors, hasTypeScriptFiles); |
| 613 | + filesToExtract, extractedFiles, defaultExtractor, customExtractors, |
| 614 | + f -> !(hasTypeScriptFiles && isFileDerivedFromTypeScriptFile(f, extractedFiles))); |
613 | 615 | }
|
614 | 616 |
|
615 | 617 | private void extractFiles(
|
616 | 618 | Set<Path> filesToExtract,
|
617 | 619 | Set<Path> extractedFiles,
|
618 | 620 | FileExtractor defaultExtractor,
|
619 | 621 | Map<String, FileExtractor> customExtractors,
|
620 |
| - boolean hasTypeScriptFiles) { |
| 622 | + Predicate<Path> shouldExtract) { |
621 | 623 |
|
622 | 624 | for (Path f : filesToExtract) {
|
623 | 625 | if (extractedFiles.contains(f))
|
624 | 626 | continue;
|
625 |
| - if (hasTypeScriptFiles && isFileDerivedFromTypeScriptFile(f, extractedFiles)) { |
| 627 | + if (!shouldExtract.test(f)) { |
626 | 628 | continue;
|
627 | 629 | }
|
628 | 630 | extractedFiles.add(f);
|
|
0 commit comments