Commit graph

8 commits

Author SHA1 Message Date
Colin Cross
5b89ec4d42 Revert "Revert "Use AAPT2 by default""
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
2018-05-25 11:34:13 -07:00
Colin Cross
d45079a9ff Add minSdkVersion to default manifests
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
2018-05-23 16:35:40 -07:00
Colin Cross
71c5b95aa6 Support LOCAL_STATIC_JAVA_AAR_LIBRARIES with aapt2
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
2018-05-23 13:39:15 -07:00
Jeff Gaston
777cf2c450 Revert "Use AAPT2 by default"
This reverts commit ba7699fb9a.

Reason for revert: Broke boot tests on walleye and taimen

Bug: 80142285
Change-Id: Ida54a0b875147420e6e9c0af41b14af50f6397e3
2018-05-22 23:13:41 +00:00
Colin Cross
ba7699fb9a Use AAPT2 by default
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
2018-05-22 01:21:55 +00:00
Colin Cross
282065ab15 Don't always filter out --auto-add-overlay
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
2018-05-17 10:16:04 -07:00
Colin Cross
d443244fbf Allow modules to override FORCE_AAPT2=true with LOCAL_USE_AAPT2 := false
Bug: 79481102
Test: m java FORCE_AAPT2=true
Change-Id: Iece2158dc887a249eb51086b2497b170b5879979
2018-05-15 15:28:22 -07:00
Colin Cross
2029903b64 Allow forcing AAPT2 on
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
2018-05-11 02:23:20 +00:00