Open timpeut opened 5 years ago
Flag has been added. Should be released in 0.27
https://github.com/bazelbuild/bazel/commit/6fe6e984c325f91a8c5d69cfef84d3ea4b06c8ef
And the native-android
fix has been added to buildifier
Wait, this didn't go in to 2.0? At this point, this is blocking the rules_kotlin proceeding with fixing this same issue, triggering the following errors:
(03:07:12) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5a661b0f3ed263c29200a380b053ff64/external/bazel_tools/tools/android/BUILD:10:1: in tags attribute of android_tools_defaults_jar rule @bazel_tools//tools/android:android_jar: The native Android rules are deprecated. Please use the Starlark Android rules by adding the following load statement to the BUILD file: load("@build_bazel_rules_android//android:rules.bzl", "android_tools_defaults_jar"). See http://github.com/bazelbuild/rules_android.
| (03:07:12) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5a661b0f3ed263c29200a380b053ff64/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/incrementaldeployment/BUILD:11:1: in tags attribute of android_library rule @bazel_tools//src/tools/android/java/com/google/devtools/build/android/incrementaldeployment:incremental_split_stub_application: The native Android rules are deprecated. Please use the Starlark Android rules by adding the following load statement to the BUILD file: load("@build_bazel_rules_android//android:rules.bzl", "android_library"). See http://github.com/bazelbuild/rules_android.
| (03:07:12) ERROR: /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5a661b0f3ed263c29200a380b053ff64/external/bazel_tools/src/tools/android/java/com/google/devtools/build/android/incrementaldeployment/BUILD:3:1: in tags attribute of android_library rule @bazel_tools//src/tools/android/java/com/google/devtools/build/android/incrementaldeployment:incremental_stub_application: The native Android rules are deprecated. Please use the Starlark Android rules by adding the following load statement to the BUILD file: load("@build_bazel_rules_android//android:rules.bzl", "android_library"). See http://github.com/bazelbuild/rules_android.
@cgruber we won't flip this flag until https://github.com/bazelbuild/bazel/issues/5354 is finished
This is labeled with breaking-change-5.0
, which I interpret as the intention to flip this with Bazel 5.0.0.
The flag is however still inactive by default:
https://github.com/bazelbuild/bazel/blob/5.0.0/src/main/java/com/google/devtools/build/lib/rules/android/AndroidConfiguration.java#L781
Please update the issue status.
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 14 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team (@bazelbuild/triage
) if you think this issue is still relevant or you are interested in getting the issue resolved.
As proposed and accepted in Android Native to Starlark Migration we will be disabling all usage of the native Android build rules. Users should be using the Starlark Android Rules.
Migration
Add the following to your
WORKSPACE
Load all
android_*
rules in yourBUILD
and.bzl
files:We will be updating
buildifier
to automatically perform step 2, but it is trivial to perform manually.Expected Timeline