-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incompatible_use_aapt2_by_default: Enable Bazel to use aapt2 by default #6907
Comments
… for enabling aapt2 by default in Bazel. FR Ref: #4103 IC Ref: #6907 RELNOTES: New incompatible change flag for defaulting to aapt2 in Android builds: `--incompatible_use_aapt2_by_default`. To build with aapt2 today, pass the flag `--incompatible_use_aapt2_by_default=true` or `--android_aapt=aapt2`, or set the `aapt_version` to `aapt2` on your `android_binary` or `android_local_test` target. PiperOrigin-RevId: 225593174
The flag is now in master. |
The incompatible change flag is expected to enter Bazel 0.22. |
when are you planning to flip the flag? |
@dslomov 0.23. |
Updated plan to flip the flag in 0.24. We are delaying this by one release because of a pending bug fix in 0.23 for android_local_test targets to correctly recognize the aapt version selection. |
Discovered an issue where building an android_library with |
This issue was tagged as "breaking-change-0.24" but does not appear ready to be flipped in the 0.24.0 release. If this is incorrect please comment on that issue and discuss with me. |
@katre Thanks for updating, and yes, it's still blocked on an internal change. |
Seems like the flag still wasn't flipped for 0.25. Changing to 0.26 |
This flag is scheduled to be flipped on August 1st / after the baseline for Bazel 0.29, the end of the current stability window. |
… depend on it at analysis time. Now, the incompatible change flag is in effect for the parts of the Android rules which select the version based on the --android_aapt config value. If the version is still `auto` after resolution of the --android_aapt flag and aapt_version attribute, default to aapt. #6907 RELNOTES: None. PiperOrigin-RevId: 254259050
… depend on it at analysis time. Now, the incompatible change flag is in effect for the parts of the Android rules which select the version based on the --android_aapt config value. If the version is still `auto` after resolution of the --android_aapt flag and aapt_version attribute, default to aapt. bazelbuild#6907 RELNOTES: None. PiperOrigin-RevId: 254259050
… depend on it at analysis time. Now, the incompatible change flag is in effect for the parts of the Android rules which select the version based on the --android_aapt config value. If the version is still `auto` after resolution of the --android_aapt flag and aapt_version attribute, default to aapt. bazelbuild#6907 RELNOTES: None. PiperOrigin-RevId: 254259050
*** Reason for rollback *** Broke Android build on Windows #9102 *** Original change description *** Default Bazel to use aapt2 and fix native tests to use aapt2. This CL sets --incompatible_use_aapt2_by_default=true and --android_aapt=aapt2. It also adds aapt2 to the mock SDK for Android analysis and integration tests. For the tests that assume and depend on AAPT, we explicitly pin them to use AAPT. Fixes #6907 Fixes #4103 RELNOTES: Bazel Android builds now use aapt2 by default. To revert to aapt, set `--an... *** ROLLBACK_OF=261424350 RELNOTES: None PiperOrigin-RevId: 262099198
…t depend on it at analysis time. Now, the incompatible change flag is in effect for the parts of the Android rules which select the version based on the --android_aapt config value. If the version is still `auto` after resolution of the --android_aapt flag and aapt_version attribute, default to aapt. bazelbuild/bazel#6907 RELNOTES: None. PiperOrigin-RevId: 254259050
…g for enabling aapt2 by default in Bazel. FR Ref: bazelbuild/bazel#4103 IC Ref: bazelbuild/bazel#6907 RELNOTES: New incompatible change flag for defaulting to aapt2 in Android builds: `--incompatible_use_aapt2_by_default`. To build with aapt2 today, pass the flag `--incompatible_use_aapt2_by_default=true` or `--android_aapt=aapt2`, or set the `aapt_version` to `aapt2` on your `android_binary` or `android_local_test` target. PiperOrigin-RevId: 225593174
Tracking issue for the incompatible change to switch Bazel to use aapt2 by default.
FR issue: #4103
To switch between aapt versions, Bazel uses the following in order of precedence:
--android_aapt
flag.aapt_version
attribute in theandroid_binary
andandroid_local_test
target.--incompatible_use_aapt2_by_default
: false -> aapt, true -> aapt2.To resolve issues when migrating your app to build with aapt2, see https://developer.android.com/studio/command-line/aapt2#aapt2_changes
The text was updated successfully, but these errors were encountered: