diff options
author | 2017-09-06 12:52:37 -0700 | |
---|---|---|
committer | 2017-09-06 15:01:07 -0700 | |
commit | 34540315a08bd0a9f89116e66ff92582b9216021 (patch) | |
tree | 930c0b97c90e5ac6fd9fe12cd3d8139927932dfd /jar | |
parent | 32f676a7b471920b49610c8f7fe68b18d77b109d (diff) |
Allow some duplicates in merged jars
Only take the first MANIFEST.MF or module-info.class file.
Test: m -j checkbuild
Change-Id: Ifbf9fe272437ef2c2bd51ab4849ac8d7ef37b6fc
Diffstat (limited to 'jar')
-rw-r--r-- | jar/jar.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/jar/jar.go b/jar/jar.go index d8f063c98..5960bf0a7 100644 --- a/jar/jar.go +++ b/jar/jar.go @@ -19,6 +19,12 @@ import ( "strings" ) +const ( + MetaDir = "META-INF/" + ManifestFile = MetaDir + "MANIFEST.MF" + ModuleInfoClass = "module-info.class" +) + // EntryNamesLess tells whether <filepathA> should precede <filepathB> in // the order of files with a .jar func EntryNamesLess(filepathA string, filepathB string) (less bool) { @@ -39,9 +45,9 @@ func patternMatch(pattern, name string) bool { } var jarOrder = []string{ - "META-INF/", - "META-INF/MANIFEST.MF", - "META-INF/*", + MetaDir, + ManifestFile, + MetaDir + "*", "*", } |