mirror of
https://github.com/material-components/material-components-android.git
synced 2026-02-20 08:39:55 +08:00
Use AAPT2 to build the framework support libraries. Apps built with AAPT2 can more efficiently link against these libraries by specifying their module name in LOCAL_STATIC_ANDROID_LIBRARIES. Ex: LOCAL_STATIC_ANDROID_LIBRARIES := android-support-v7-appcompat android-support-v4 Apps built with AAPT2 do not need to specify --auto-add-overlay or --extra-packages, as these are automatically added as needed by the build system. This change will not affect any apps that currently depend on the support libraries. This is because they import the resources directly. We use LOCAL_JAR_EXCLUDE_FILES := none only to support javac when building javadoc. Jack builds are correct because the build system passes in the latest generated R.java ahead of any previous ones packaged in classes.jack. This means we can dynamically reference a support lib module, correctly seeing non-final R.java. Then at app package time, we only include the final R.java generated by the AAPT2 packaging step. Bug:25958912 Change-Id: I71bff080ff2694aa3df1c8a67d933e2daab0f245 GitOrigin-RevId=0dac8d82e2a249d7c9c42ab259389e11cac15400 PiperOrigin-RevId: 140560475
Description
Languages
Java
99.9%
Kotlin
0.1%