Removing AAPT1 support removed the distinction between unset
LOCAL_USE_AAPT2 and LOCAL_USE_AAPT2 := true, which enabled the
LCOAL_SDK_RES_VERSION setting for some modules that had previously
bypassed it because of LOCAL_USE_AAPT2 := true. The workaround
was too broad, it shouldn't apply if LOCAL_SDK_VERSION is already
set to *current. In particular, if it is core_current to disable
using framework-res.apk completely, then LOCAL_SDK_RES_VERSION
must not be set to current.
Fixes: 130782219
Test: atest android.server.wm.PrereleaseSdkTest
Change-Id: I250d65b1ef66e591f2c9779580df4cc3f0f2b028
AAPT2 is used everywhere now, remove support for AAPT1. Also
removes dpi_specific_apk.mk, it was never updated to use AAPT2
and has been generating bad APKs (resource ID mismatch between
the dex files and the resources) since AAPT2 was made the default
in May 2018 (I9b67fd2a9b3234798b2aac879b5242c2097b3863).
Bug: 80450981
Test: m checkbuild
Change-Id: I2ff768897360ff866dbae5562455bab22be270f7
Merged-In: I2ff768897360ff866dbae5562455bab22be270f7
Share the logic that converts LOCAL_SDK_VERSION, LOCAL_MIN_SDK_VERSION
and the global config values into minSdkVersion, targetSdkVersion,
and compileSdkVersion.
Test: m checkbuild
Change-Id: Id038673662b23cffc9e57978ac55a3f35ef8237a
This reverts commit 777cf2c450.
Reason for revert: manifest merger is used for libraries forced to aapt2 now
Bug: 79481102
Test: m checkbuild
Change-Id: I9b67fd2a9b3234798b2aac879b5242c2097b3863
If the default manifest that doesn't set minSdkVersion is passed to
manifest merger along with a library manifest that does, it will fail
with:
.../DefaultManifest.xml Error:
uses-sdk:minSdkVersion 1 cannot be smaller than version 14 declared in library ...
Translate LOCAL_MIN_SDK_VERSION or LOCAL_SDK_VERSION to minSdkVersion
in DefaultManifest.xml.
Bug: 79481102
Test: m checkbuild
Change-Id: I4d792d48612e6a1111e05a9e4a71bb4d87eae1ad
LOCAL_STATIC_JAVA_AAR_LIBRARIES are slightly different from
LOCAL_STATIC_ANDROID_LIBRARIES, due to b/78447299 the
AndroidManifest.xml from ANDROID libraries are ignored.
Temporarily add support for LOCAL_STATIC_JAVA_AAR_LIBRARIES
when using LOCAL_USE_AAPT2 := true, treating them the same
as LOCAL_STATIC_ANDROID_LIBRARIES except that they are
merged by android_manifest.xml
Bug: 78447299
Bug: 79481102
Test: m FORCE_AAPT2=true checkbuild
Change-Id: Ia6210810c1ea6e776be97ae1c9a586b5de844125
This reverts commit ba7699fb9a.
Reason for revert: Broke boot tests on walleye and taimen
Bug: 80142285
Change-Id: Ida54a0b875147420e6e9c0af41b14af50f6397e3
Switch to using AAPT2 by default. Can be disabled globally with
FORCE_AAPT2=false or per-module with LOCAL_USE_AAPT2 := false.
Bug: 79481102
Test: m checkbuild
Change-Id: I35719f708fa3bcc1d54721e62ac9cc8780f7cbbe
There are some cases where --auto-add-overlay is added for legitimite
reasons, for example in RROs. Only filter it out from modules that
were using --extra-packages for support library modules.
Test: m FORCE_AAPT2=true java
Change-Id: I165fa577f2204ecbc57e71f946db3f346568ad81
Building with FORCE_AAPT2=true will turn on AAPT2 for all modules
unless they set LOCAL_USE_AAPT2 := false. The build system will
attempt to rewrite common AAPT patterns into AAPT2 patterns,
including removing --extra-packages for support library packages,
removing LOCAL_RESOURCE_DIR point to support library resources,
adding a default empty manifest file if it doesn't exist, and
converting LOCAL_STATIC_JAVA_AAR_LIBRARIES to
LOCAL_STATIC_ANDROID_LIBRARIES.
Bug: 79481102
Test: m checkbuild
Change-Id: I8d9d55fe4d5d5c965c64b0407efe74e0afc35c3a