Commit graph

57 commits

Author SHA1 Message Date
Colin Cross
feec25b084 Move dexpreopt.Script to android.RuleBuilder
Move dexpreopt.Script to android.RuleBuilder so that the builder
style can be used in more places.  Also add tests for it.

Test: rule_builder_test.go
Change-Id: I92a963bd112bf033b08899e930094b908acfcdfd
2019-02-05 13:28:43 -08:00
David Brazdil
91b4e3e78b Disable all-assigned check in hiddenapi on master-art
Master-art configurations do not have frameworks/base and therefore do
not have hidden API flags. Pass --no-force-assign-all to `hiddenapi`
when frameworks/base does not exist to disable the corresponding
assertion. This enables us to enforce the assertion on non-master-art
builds and also get rid of logspam about missing flags on ART buildbots.

Test: art/tools/buildbot-build.sh on master-art
Bug: 123143676
Change-Id: I074d9554fb11dab3eef904016375730520107ec2
2019-01-23 22:55:41 +00:00
Nicolas Geoffray
65fd8ba2fe Always do zipalign with uncompressDex.
Also preserve the alignment with hiddenapi.

Test: conscrypt apex has its conscrypt.jar zipaligned.
Change-Id: I43cc0eadb9548c3d8055e12c077fb7bbe1935fe6
2019-01-23 06:36:48 +00:00
David Brazdil
0f670a22df Replace hiddenapi-{public,private}-list.txt with a CSV file
`hiddenapi` is being refactored to work with a single CSV file as
opposued to a multitude of text files (one per flag). This patch
changes the singleton rule for listing public/private APIs from
stubs to expect a CSV as an output.

Bug: 119068555
Test: compiles, hiddenapi-flags.csv unchanged
Change-Id: I622521d59979a6b01ecc8065a278412fedf7b9bc
2019-01-21 14:30:49 +00:00
Colin Cross
cd964b3ea1 Maintain uncompressed dex through hiddenapi encode
hiddenapi encode unzips and rezips the dex jar.  Pass uncompressDex
into it so that it doesn't make classes.dex compressed in the dex
jar when it was previously uncompressed.

Bug: 123100239
Test: m checkbuild
Test: zipinfo $OUT/system/framework/conscrypt.jar shows uncompressed classes.dex
Change-Id: If36cde330eb0bcb1e1db3c582452c5faebc8ff29
2019-01-19 06:10:00 +00:00
David Brazdil
9fc36a68d0 Restore UNSAFE_DISABLE_HIDDENAPI_FLAGS functionality.
It got broken with the move to hiddenapi to Soong.

Test: UNSAFE_DISABLE_HIDDENAPI_FLAGS=true m -j32
Change-Id: Id369bfae8e118907b1f12faa7e4207494904edda
2019-01-18 11:12:33 +00:00
Colin Cross
8faf8fc060 Move hiddenapi to Soong
Perform hiddenapi CSV generation and dex encoding for Soong modules
in Soong.  This fixes an issue where dexpreopting was happening on
a different jar than was being installed.

Bug: 122856783
Test: m checkbuild
Test: no change out/target/common/obj/PACKAGING/hiddenapi-flags.csv
Test: only ordering change to out/target/common/obj/PACKAGING/hiddenapi-greylist.csv
Test: cts/tests/signature/runSignatureTests.sh
Change-Id: I4fc481efc29e73cb2bdaacf672e86d5f6f0075ae
2019-01-17 22:19:28 +00:00