Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore duplicated module-info.class in JAR root #61

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Ignore duplicated module-info.class in JAR root
mirfatif authored and Howard20181 committed Oct 19, 2024
commit 174eec31931e08d16ff31773307c28ab5620e21c
Original file line number Diff line number Diff line change
@@ -27,8 +27,8 @@ internal fun JarOutputStream.createFile(name: String, data: ByteArray) {
write(data)
closeEntry()
} catch (e: ZipException) {
// it's normal to have duplicated files in META-INF
if (!name.startsWith("META-INF")) throw e
// it's normal to have duplicated files in META-INF and duplicated module-info.class in root
if (!name.startsWith("META-INF") && name != "module-info.class") throw e
}
}