Skip to content

Commit c09ae42

Browse files
committed
Fixed issue
1 parent 4a83a73 commit c09ae42

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/org/mangorage/bootstrap/internal/JarHandler.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ static void handle(final Path source, final Path target) throws IOException {
4242
}
4343

4444
if (!seenModules.containsKey(moduleName)) {
45+
if (check(jar)) continue;
4546
Path dest = target.resolve(jar.getFileName());
4647
Files.copy(jar, dest, StandardCopyOption.REPLACE_EXISTING);
4748
seenModules.put(moduleName, jar);
@@ -55,6 +56,10 @@ static void handle(final Path source, final Path target) throws IOException {
5556
System.out.println("Finished deduplicating modules. Result at: " + target);
5657
}
5758

59+
static boolean check(Path path) {
60+
return path.toString().contains("okio") && !path.toString().contains("jvm");
61+
}
62+
5863
private static void deleteDirectory(Path dir) throws IOException {
5964
Files.walk(dir)
6065
.sorted(Comparator.reverseOrder())
@@ -70,7 +75,7 @@ private static String resolveModuleName(Path jarPath) {
7075
return ModuleFinder.of(jarPath).findAll().iterator().next().descriptor().name();
7176
} else {
7277
final var found = ModuleFinder.of(jarPath).findAll().stream().findAny();
73-
if (found.isPresent() && jarPath.toString().contains("core")) {
78+
if (found.isPresent()) {
7479
return found.get().descriptor().name();
7580
}
7681

0 commit comments

Comments
 (0)