Skip to content
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

Update rules_android. Reapply ba7310ce4a1d8fb14434597fbc7440a4074f7695 #1297

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ build --tool_java_runtime_version=remotejdk_11
build --experimental_strict_java_deps=strict
build --explicit_java_test_deps

build --experimental_sibling_repository_layout

# Make sure we get something helpful when tests fail
test --verbose_failures
test --test_output=errors
Expand Down
4 changes: 2 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module(

bazel_dep(
name = "rules_android",
version = "0.1.1",
version = "0.6.0",
)
bazel_dep(
name = "bazel_features",
Expand All @@ -30,7 +30,7 @@ bazel_dep(
)
bazel_dep(
name = "rules_kotlin",
version = "1.9.6",
version = "2.0.0",
)
bazel_dep(
name = "rules_shell",
Expand Down
33 changes: 18 additions & 15 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
workspace(name = "rules_jvm_external")

android_sdk_repository(name = "androidsdk")

android_ndk_repository(name = "androidndk")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file")
load(
"//private:versions.bzl",
Expand Down Expand Up @@ -530,9 +526,10 @@ maven_install(

maven_install(
name = "starlark_aar_import_with_sources_test",
# Not actually necessary since this is the default value, but useful for
# testing.
aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl",
# The default is "@rules_android//rules:rules.bzl" but use
# "@rules_android//android:rules.bzl" with the older 0.1.1 release
# to use the native rules.
aar_import_bzl_label = "@rules_android//android:rules.bzl",
artifacts = [
"androidx.work:work-runtime:2.6.0",
],
Expand All @@ -546,9 +543,10 @@ maven_install(

maven_install(
name = "starlark_aar_import_test",
# Not actually necessary since this is the default value, but useful for
# testing.
aar_import_bzl_label = "@build_bazel_rules_android//android:rules.bzl",
# The default is "@rules_android//rules:rules.bzl" but use
# "@rules_android//android:rules.bzl" with the older 0.1.1 release
# to use the native rules.
aar_import_bzl_label = "@rules_android//android:rules.bzl",
artifacts = [
"com.android.support:appcompat-v7:28.0.0",
],
Expand All @@ -561,12 +559,17 @@ maven_install(
)

# for the above "starlark_aar_import_test" maven_install with
# use_starlark_android_rules = True
# use_starlark_android_rules = True.
# Note that this version is different from the version in MODULE.bazel
# because the latest versions of rules_android do not support Bazel 5 or 6,
# which rules_jvm_external supports and uses in CI tests. So use
# rules_android 0.1.1, which are wrappers around the native Android rules,
# since the tests with Bazel 6 do no use bzlmod.
http_archive(
name = "build_bazel_rules_android",
sha256 = "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806",
strip_prefix = "rules_android-0.1.1",
urls = ["https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip"],
name = "rules_android",
sha256 = "af84b69ab3d16dd1a41056286e6511f147a94ccea995603e13e934c915c1631c",
strip_prefix = "rules_android-0.6.0",
url = "https://github.com/bazelbuild/rules_android/releases/download/v0.6.0/rules_android-v0.6.0.tar.gz",
)

# https://github.com/bazelbuild/rules_jvm_external/issues/351
Expand Down
1 change: 0 additions & 1 deletion WORKSPACE.bzlmod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ workspace(name = "rules_jvm_external")

# Use this until we can use some pure-bzlmod approach
android_sdk_repository(name = "androidsdk")
android_ndk_repository(name = "androidndk")
Loading