Reland "Android: Link against apk_under_test resources for test apks"
This reverts commit 6fe841a9. Reason for reland: Fixed the build error. Built all locally. Test apks are allowed to reference resources that live in the apk_under_test. We've previous supported such references via R.java constants, but this CL also adds the ability for resources in the test apk to directly reference resources in the apk_under_test (e.g. via xml @references). The need for this has come with the latest version of the support library. To accomplish this: 1. Adds a "-I UnderTest.ap_" flag when compiling test apks resources 2. Sets the test apk's arsc package name to match the apk_under_test's package name. 3. Uses --emit-ids / --stable-ids to avoid collisions between the test apk and the apk_under_test. 4. Updates incremental install manifest logic to do the same trick. Some other small tweaks to related resource code: * Removes incremental AndroidManifest.xml as an explicit build output * Moves most uses of "aapt dump" to "aapt2 dump" * Removes --check-resources-pkg-id in favor of always enabling it * Removes --optimize-resources in favor of having it implicitly set by --optimized-resources-path Bug: 896775 Change-Id: I37aa5b969023ccdaad45e7617f811d1781564c29 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1567926Reviewed-by:Tibor Goldschwendt <tiborg@chromium.org> Commit-Queue: Andrew Grieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#651093}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment