aboutsummaryrefslogtreecommitdiffstats
path: root/jar
Commit message (Collapse)AuthorAgeFilesLines
* soong_zip: Add testsColin Cross2018-09-281-20/+8
| | | | | | | | | | Add test that cover basic command line usage of soong_zip. -D is not covered yet as the implementation will be replaced with one that is also more easily testable in the next patch. Bug: 116751500 Test: zip_test.go Change-Id: I5a1bcee74ebc9cb3cf332c36f89bc12c0e807ad2
* Change default jar time to match ziptimeColin Cross2017-10-041-1/+1
| | | | | | | Ziptime uses Jan 01 2008, use the same in soong_zip and merge_zips. Test: manual Change-Id: Ie79a2e7864a5ed5a74833caec0a50c25a451859e
* Correctly set date and mode fields for MANIFEST.MFColin Cross2017-09-291-0/+2
| | | | | | | | | | | | The file header returned by jar.ManifestFileContents had unset date and mode fields. The unset date field resulted in the "Last Mod Time" field in the zip file being set to 0, which OpenJDK 9's jar implementation treats as an error: java.time.DateTimeException: Invalid value for MonthOfYear (valid values 1 - 12): 0 Bug: 67095392 Test: zipdetails out/host/linux-x86/framework/tradefed.jar Change-Id: I0a818d57420f5e5de57e8ff57791951c1b538443
* Rearrange manifest file handling in merge_zips and soong_zipColin Cross2017-09-202-0/+66
| | | | | | | | | | | | | Jar always puts default MANIFEST.MF files in if none was specified. Copying that behavior in soong_zip causes problems with merge_zips, because it ends up taking the default manifest from the classes.jar instead of the user's manifest from res.jar. We don't want the user's manifest in the classes.jar, otherwise a change to the manifest will cause all the class files to rebuild. Instead, move the manifest insertion to the final merge_zips stage. Test: m -j checkbuild Change-Id: Id6376961dbaf743c2fb92843f9bdf2e44b963be0
* Allow some duplicates in merged jarsColin Cross2017-09-061-3/+9
| | | | | | | Only take the first MANIFEST.MF or module-info.class file. Test: m -j checkbuild Change-Id: Ifbf9fe272437ef2c2bd51ab4849ac8d7ef37b6fc
* Extract jar-sorting to be accessible to soong_zipJeff Gaston2017-08-242-0/+77
Bug: 64536066 Test: m -j # which runs unit tests Change-Id: I4830bd331c9dab0b1d300a18aefaf25a6af4cfdc