diff options
author | Ted Xie <tedx@google.com> | 2023-09-15 14:02:30 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-09-15 14:03:06 -0700 |
commit | ad1727aae8f5183b6d4baa9802bad530d8c366db (patch) | |
tree | 793d0dc1b705978f09edb840c4edca003fe68c6f | |
parent | 2e2f840ebb02b737f116ca1c3ab604fc60ae90ca (diff) | |
download | bazelbuild-rules_android-ad1727aae8f5183b6d4baa9802bad530d8c366db.tar.gz |
Change rules_android workspace name
...from build_bazel_rules_android to just rules_android
Closes https://github.com/bazelbuild/rules_android/pull/8
PiperOrigin-RevId: 565772198
Change-Id: I7e113000844b7d6804d8342e43492e9704f42af9
-rw-r--r-- | README.md | 12 | ||||
-rw-r--r-- | WORKSPACE | 2 | ||||
-rw-r--r-- | WORKSPACE.bzlmod | 2 | ||||
-rw-r--r-- | rules/flags/BUILD | 2 | ||||
-rw-r--r-- | src/tools/ak/rjar/rjar_test.go | 2 | ||||
-rw-r--r-- | src/tools/javatests/com/google/devtools/build/android/sandboxedsdktoolbox/utils/TestData.java | 2 | ||||
-rw-r--r-- | test/bashunit/unittest_test.py | 2 | ||||
-rw-r--r-- | test/rules/android_sdk_repository/android_helper.sh | 6 | ||||
-rwxr-xr-x | test/rules/android_sdk_repository/android_sdk_repository_platforms_test.sh | 4 | ||||
-rwxr-xr-x | test/rules/android_sdk_repository/android_sdk_repository_test.sh | 4 | ||||
-rw-r--r-- | test/rules/android_sdk_repository/test_lib.sh | 4 | ||||
-rwxr-xr-x | test/utils/integration_demo/demo_test.sh | 2 |
12 files changed, 22 insertions, 22 deletions
@@ -33,24 +33,24 @@ To use the Starlark Bazel Android rules, add the following to your WORKSPACE fil RULES_ANDROID_COMMIT= "0bf3093bd011acd35de3c479c8990dd630d552aa" RULES_ANDROID_SHA = "b75a673a66c157138ab53f4d8612a6e655d38b69bb14207c1a6675f0e10afa61" http_archive( - name = "build_bazel_rules_android", + name = "rules_android", url = "https://github.com/bazelbuild/rules_android/archive/%s.zip" % RULES_ANDROID_COMMIT, sha256 = RULES_ANDROID_SHA, strip_prefix = "rules_android-%s" % RULES_ANDROID_COMMIT, ) - load("@build_bazel_rules_android//:prereqs.bzl", "rules_android_prereqs") + load("@rules_android//:prereqs.bzl", "rules_android_prereqs") rules_android_prereqs() - load("@build_bazel_rules_android//:defs.bzl", "rules_android_workspace") + load("@rules_android//:defs.bzl", "rules_android_workspace") rules_android_workspace() register_toolchains( - "@build_bazel_rules_android//toolchains/android:android_default_toolchain", - "@build_bazel_rules_android//toolchains/android_sdk:android_sdk_tools", + "@rules_android//toolchains/android:android_default_toolchain", + "@rules_android//toolchains/android_sdk:android_sdk_tools", ) Then, in your BUILD files, import and use the rules: - load("@build_bazel_rules_android//rules:rules.bzl", "android_binary", "android_library") + load("@rules_android//rules:rules.bzl", "android_binary", "android_library") android_binary( ... ) @@ -1,4 +1,4 @@ -workspace(name = "build_bazel_rules_android") +workspace(name = "rules_android") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load(":android_sdk_supplemental_repository.bzl", "android_sdk_supplemental_repository") diff --git a/WORKSPACE.bzlmod b/WORKSPACE.bzlmod index 540b125..ce455f6 100644 --- a/WORKSPACE.bzlmod +++ b/WORKSPACE.bzlmod @@ -1,4 +1,4 @@ -workspace(name = "build_bazel_rules_android") +workspace(name = "rules_android") load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") diff --git a/rules/flags/BUILD b/rules/flags/BUILD index d7fcb6a..f113f07 100644 --- a/rules/flags/BUILD +++ b/rules/flags/BUILD @@ -20,7 +20,7 @@ bzl_library( string_flag( name = "runfiles_root_prefix", - build_setting_default = "build_bazel_rules_android/", + build_setting_default = "rules_android/", visibility = ["//visibility:public"], ) diff --git a/src/tools/ak/rjar/rjar_test.go b/src/tools/ak/rjar/rjar_test.go index 8c29650..7bce7b5 100644 --- a/src/tools/ak/rjar/rjar_test.go +++ b/src/tools/ak/rjar/rjar_test.go @@ -29,7 +29,7 @@ var ( const ( java = "local_jdk/bin/java" - testDataBase = "build_bazel_rules_android/src/tools/ak/rjar/testdata" + testDataBase = "rules_android/src/tools/ak/rjar/testdata" ) func TestCreateRJar(t *testing.T) { diff --git a/src/tools/javatests/com/google/devtools/build/android/sandboxedsdktoolbox/utils/TestData.java b/src/tools/javatests/com/google/devtools/build/android/sandboxedsdktoolbox/utils/TestData.java index fdf96c5..7da5f1a 100644 --- a/src/tools/javatests/com/google/devtools/build/android/sandboxedsdktoolbox/utils/TestData.java +++ b/src/tools/javatests/com/google/devtools/build/android/sandboxedsdktoolbox/utils/TestData.java @@ -27,7 +27,7 @@ public final class TestData { public static final Path JAVATESTS_DIR = Path.of( System.getenv("TEST_SRCDIR"), - "/build_bazel_rules_android/src/tools/javatests/"); + "/rules_android/src/tools/javatests/"); /** Reads the contents of a file, assuming its path is absolute. */ public static String readFromAbsolutePath(Path absolutePath) throws Exception { diff --git a/test/bashunit/unittest_test.py b/test/bashunit/unittest_test.py index 2ecc17f..f5da4f7 100644 --- a/test/bashunit/unittest_test.py +++ b/test/bashunit/unittest_test.py @@ -42,7 +42,7 @@ fi echo "Writing XML to ${XML_OUTPUT_FILE}" -source "$(rlocation "build_bazel_rules_android/test/bashunit/unittest.bash")" \ +source "$(rlocation "rules_android/test/bashunit/unittest.bash")" \ || { echo "Could not source unittest.bash" >&2; exit 1; } """ diff --git a/test/rules/android_sdk_repository/android_helper.sh b/test/rules/android_sdk_repository/android_helper.sh index 15b4945..fedd9fc 100644 --- a/test/rules/android_sdk_repository/android_helper.sh +++ b/test/rules/android_sdk_repository/android_helper.sh @@ -25,7 +25,7 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e # --- end runfiles.bash initialization v2 --- -source "$(rlocation build_bazel_rules_android/test/bashunit/unittest.bash)" || \ +source "$(rlocation rules_android/test/bashunit/unittest.bash)" || \ (echo >&2 "Failed to locate bashunit.sh" && exit 1) function set_up() { @@ -42,9 +42,9 @@ function set_up() { } function set_up_rules() { - local android_revision_rule="$(rlocation build_bazel_rules_android/rules/android_revision.bzl)" + local android_revision_rule="$(rlocation rules_android/rules/android_revision.bzl)" - local repo_rule="$(rlocation build_bazel_rules_android/rules/android_sdk_repository/rule.bzl)" + local repo_rule="$(rlocation rules_android/rules/android_sdk_repository/rule.bzl)" local repo_rule_dir="$(dirname "${repo_rule}")" local dest_dir="${TEST_TMPDIR}/android_sdk_repository_src" mkdir -p "${dest_dir}/rules/android_sdk_repository" diff --git a/test/rules/android_sdk_repository/android_sdk_repository_platforms_test.sh b/test/rules/android_sdk_repository/android_sdk_repository_platforms_test.sh index 20eaf84..5040cd4 100755 --- a/test/rules/android_sdk_repository/android_sdk_repository_platforms_test.sh +++ b/test/rules/android_sdk_repository/android_sdk_repository_platforms_test.sh @@ -25,13 +25,13 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e # --- end runfiles.bash initialization v2 --- -source "$(rlocation build_bazel_rules_android/test/bashunit/unittest.bash)" || \ +source "$(rlocation rules_android/test/bashunit/unittest.bash)" || \ (echo >&2 "Failed to locate bashunit.sh" && exit 1) ENABLE_PLATFORMS=true # Source and run the actual tests from test_lib.sh -source "$(rlocation build_bazel_rules_android/test/rules/android_sdk_repository/test_lib.sh)" || \ +source "$(rlocation rules_android/test/rules/android_sdk_repository/test_lib.sh)" || \ (echo >&2 "Failed to locate test_lib.sh" && exit 1) run_suite "Android integration tests for SDK (with platforms)" diff --git a/test/rules/android_sdk_repository/android_sdk_repository_test.sh b/test/rules/android_sdk_repository/android_sdk_repository_test.sh index 53d6573..5cfd330 100755 --- a/test/rules/android_sdk_repository/android_sdk_repository_test.sh +++ b/test/rules/android_sdk_repository/android_sdk_repository_test.sh @@ -25,13 +25,13 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e # --- end runfiles.bash initialization v2 --- -source "$(rlocation build_bazel_rules_android/test/bashunit/unittest.bash)" || \ +source "$(rlocation rules_android/test/bashunit/unittest.bash)" || \ (echo >&2 "Failed to locate bashunit.sh" && exit 1) ENABLE_PLATFORMS=false # Source and run the actual tests from test_lib.sh -source "$(rlocation build_bazel_rules_android/test/rules/android_sdk_repository/test_lib.sh)" || \ +source "$(rlocation rules_android/test/rules/android_sdk_repository/test_lib.sh)" || \ (echo >&2 "Failed to locate test_lib.sh" && exit 1) run_suite "Android integration tests for SDK" diff --git a/test/rules/android_sdk_repository/test_lib.sh b/test/rules/android_sdk_repository/test_lib.sh index c883dbc..17d2485 100644 --- a/test/rules/android_sdk_repository/test_lib.sh +++ b/test/rules/android_sdk_repository/test_lib.sh @@ -25,10 +25,10 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e # --- end runfiles.bash initialization v2 --- -source "$(rlocation build_bazel_rules_android/test/bashunit/unittest.bash)" || \ +source "$(rlocation rules_android/test/bashunit/unittest.bash)" || \ (echo >&2 "Failed to locate bashunit.sh" && exit 1) -source "$(rlocation build_bazel_rules_android/test/rules/android_sdk_repository/android_helper.sh)" || \ +source "$(rlocation rules_android/test/rules/android_sdk_repository/android_helper.sh)" || \ (echo >&2 "Failed to locate android_helper.sh" && exit 1) # Actual tests for Android Sdk Repository diff --git a/test/utils/integration_demo/demo_test.sh b/test/utils/integration_demo/demo_test.sh index 5e3daaf..e47690c 100755 --- a/test/utils/integration_demo/demo_test.sh +++ b/test/utils/integration_demo/demo_test.sh @@ -26,7 +26,7 @@ source "${RUNFILES_DIR:-/dev/null}/$f" 2>/dev/null || \ { echo>&2 "ERROR: cannot find $f"; exit 1; }; f=; set -e # --- end runfiles.bash initialization v2 --- -source "$(rlocation build_bazel_rules_android/test/bashunit/unittest.bash)" || \ +source "$(rlocation rules_android/test/bashunit/unittest.bash)" || \ (echo >&2 "Failed to locate bashunit.sh" && exit 1) function test_bazel_exists() { |