Skip to content

Commit 8551691

Browse files
vfyjxfTechnici4n
andauthored
Avoid write pom file to legacyClasspath when using additionalRuntimeClasspath (#307)
Co-authored-by: Bruno Ploumhans <[email protected]>
1 parent 905a29c commit 8551691

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/net/neoforged/moddevgradle/internal/WriteLegacyClasspath.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ void addEntries(Object... filesNotation) {
2626
// Use a provider indirection to remove task dependencies.
2727
// Use file names only.
2828
return files.getFiles().stream()
29+
// Some dependencies (such as Graal JS) can have non-jar artifacts.
30+
// Leaving them on the legacy CP will crash when SJH fails to open a filesystem for them,
31+
// so we ignore them since they would be ignored on the normal java classpath.
32+
.filter(file -> file.isDirectory() || file.getName().endsWith(".jar") || file.getName().endsWith(".zip"))
2933
.map(File::getAbsolutePath)
3034
.toList();
3135
}));

0 commit comments

Comments
 (0)