diff --git a/.bazelversion b/.bazelversion index 2bf50aa..f7ee066 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -8.3.0 +9.0.0 diff --git a/.bcr/presubmit.yml b/.bcr/presubmit.yml index 34333e3..25abae7 100644 --- a/.bcr/presubmit.yml +++ b/.bcr/presubmit.yml @@ -1,7 +1,7 @@ bcr_test_module: module_path: "e2e/smoke" matrix: - platform: ["debian10", "macos", "ubuntu2004", "windows"] + platform: ["debian10", "macos_arm64", "ubuntu2004", "windows"] tasks: run_tests: name: "Run test module" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b2c718e..1a823de 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,8 +21,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - bzlmod: [true] - bazel_version: ["7.4.1", "8.0.1"] + bazel_version: ["8.x", "9.x"] runs-on: ${{ matrix.os }} steps: - name: "Checkout the sources" @@ -39,15 +38,14 @@ jobs: - name: "Running tests //..." env: USE_BAZEL_VERSION: ${{ matrix.bazel_version }} - run: bazel test //... --enable_bzlmod=${{ matrix.bzlmod }} + run: bazel test //... integration-tests: strategy: matrix: os: [ubuntu-latest] - bzlmod: [true] directory: [examples/simple-android] strategy: [local, worker] - bazel_version: ["7.4.1", "8.0.1"] + bazel_version: ["8.x", "9.x"] runs-on: ${{ matrix.os }} steps: - name: "Checkout the sources" @@ -65,4 +63,4 @@ jobs: env: USE_BAZEL_VERSION: ${{ matrix.bazel_version }} working-directory: ${{ matrix.directory }} - run: bazel test //... --enable_bzlmod=${{ matrix.bzlmod }} --strategy=AndroidLint=${{ matrix.strategy }} + run: bazel test //... --strategy=AndroidLint=${{ matrix.strategy }} diff --git a/MODULE.bazel b/MODULE.bazel index e31f25e..630aec2 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -4,17 +4,18 @@ module( compatibility_level = 1, ) -bazel_dep(name = "rules_android", version = "0.6.1") -bazel_dep(name = "rules_java", version = "8.6.3") -bazel_dep(name = "rules_jvm_external", version = "6.7") -bazel_dep(name = "rules_kotlin", version = "2.1.0") -bazel_dep(name = "bazel_skylib", version = "1.7.1") -bazel_dep(name = "platforms", version = "0.0.8") -bazel_dep(name = "bazel_worker_api", version = "0.0.4") -bazel_dep(name = "bazel_worker_java", version = "0.0.4") +bazel_dep(name = "rules_android", version = "0.7.1") +bazel_dep(name = "rules_java", version = "9.3.0") +bazel_dep(name = "rules_jvm_external", version = "6.9") +bazel_dep(name = "rules_kotlin", version = "2.2.2") +bazel_dep(name = "rules_python", version = "1.7.0") +bazel_dep(name = "bazel_skylib", version = "1.9.0") +bazel_dep(name = "platforms", version = "1.0.0") +bazel_dep(name = "bazel_worker_api", version = "0.0.10") +bazel_dep(name = "bazel_worker_java", version = "0.0.10") -bazel_dep(name = "aspect_bazel_lib", version = "2.11.0", dev_dependency = True) -bazel_dep(name = "buildifier_prebuilt", version = "8.0.0", dev_dependency = True) +bazel_dep(name = "aspect_bazel_lib", version = "2.22.5", dev_dependency = True) +bazel_dep(name = "buildifier_prebuilt", version = "8.2.1.2", dev_dependency = True) register_toolchains("//toolchains:android_lint_default_toolchain") diff --git a/e2e/smoke/MODULE.bazel b/e2e/smoke/MODULE.bazel index e42c801..386fb44 100644 --- a/e2e/smoke/MODULE.bazel +++ b/e2e/smoke/MODULE.bazel @@ -1,5 +1,5 @@ bazel_dep(name = "rules_android_lint", version = "0.0.0", dev_dependency = True) -bazel_dep(name = "bazel_skylib", version = "1.7.1", dev_dependency = True) +bazel_dep(name = "bazel_skylib", version = "1.9.0", dev_dependency = True) local_path_override( module_name = "rules_android_lint", diff --git a/e2e/smoke/WORKSPACE.bazel b/e2e/smoke/WORKSPACE.bazel index 1e9cb40..9644d9a 100644 --- a/e2e/smoke/WORKSPACE.bazel +++ b/e2e/smoke/WORKSPACE.bazel @@ -1,19 +1 @@ -# Override http_archive for local testing -local_repository( - name = "rules_android_lint", - path = "../..", -) - -#---SNIP--- Below here is re-used in the workspace snippet published on releases - -###################### -# rules_android_lint setup # -###################### -# Fetches the rules_android_lint dependencies. -# If you want to have a different version of some dependency, -# you should fetch it *before* calling this. -# Alternatively, you can skip calling this function, so long as you've -# already fetched all the dependencies. -load("@rules_android_lint//android_lint:repositories.bzl", "rules_android_lint_dependencies") - -rules_android_lint_dependencies() +# Marker file for Bazel workspace root diff --git a/e2e/smoke/WORKSPACE.bzlmod b/e2e/smoke/WORKSPACE.bzlmod deleted file mode 100644 index 7784218..0000000 --- a/e2e/smoke/WORKSPACE.bzlmod +++ /dev/null @@ -1,2 +0,0 @@ -# When --enable_bzlmod is set, this file replaces WORKSPACE.bazel. -# Dependencies then come from MODULE.bazel instead. diff --git a/examples/simple-android/.bazelrc b/examples/simple-android/.bazelrc index 65ba186..3734ded 100644 --- a/examples/simple-android/.bazelrc +++ b/examples/simple-android/.bazelrc @@ -1,4 +1,3 @@ -common --enable_bzlmod common --lockfile_mode=off common --experimental_google_legacy_api test --test_output=all diff --git a/examples/simple-android/MODULE.bazel b/examples/simple-android/MODULE.bazel index 90a53b3..dd20275 100644 --- a/examples/simple-android/MODULE.bazel +++ b/examples/simple-android/MODULE.bazel @@ -12,14 +12,14 @@ local_path_override( ) bazel_dep(name = "platforms", version = "1.0.0") -bazel_dep(name = "rules_android", version = "0.6.5") -bazel_dep(name = "rules_jvm_external", version = "6.7") +bazel_dep(name = "rules_android", version = "0.7.1") +bazel_dep(name = "rules_jvm_external", version = "6.9") remote_android_extensions = use_extension( "@rules_android//bzlmod_extensions:android_extensions.bzl", "remote_android_tools_extensions", ) -use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools") +use_repo(remote_android_extensions, "android_tools") android_sdk_repository_extension = use_extension("@rules_android//rules/android_sdk_repository:rule.bzl", "android_sdk_repository_extension") use_repo(android_sdk_repository_extension, "androidsdk") diff --git a/examples/simple-android/WORKSPACE.bazel b/examples/simple-android/WORKSPACE.bazel new file mode 100644 index 0000000..9644d9a --- /dev/null +++ b/examples/simple-android/WORKSPACE.bazel @@ -0,0 +1 @@ +# Marker file for Bazel workspace root diff --git a/examples/simple-android/WORKSPACE.bzlmod b/examples/simple-android/WORKSPACE.bzlmod deleted file mode 100644 index e69de29..0000000 diff --git a/maven_install.json b/maven_install.json index 0c93e4a..126db57 100755 --- a/maven_install.json +++ b/maven_install.json @@ -1,7 +1,7 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 1552138821, - "__RESOLVED_ARTIFACTS_HASH": 419430451, + "__INPUT_ARTIFACTS_HASH": 1120496732, + "__RESOLVED_ARTIFACTS_HASH": 1645161352, "artifacts": { "com.android.tools.analytics-library:protos": { "shasums": { @@ -143,9 +143,9 @@ }, "com.google.code.gson:gson": { "shasums": { - "jar": "4241c14a7727c34feea6507ec801318a3d4a90f070e4525681079fb94ee4c593" + "jar": "0cdd163ce3598a20fc04eee71b140b24f6f2a3b35f0a499dbbdd9852e83fbfaf" }, - "version": "2.10.1" + "version": "2.10" }, "com.google.errorprone:error_prone_annotations": { "shasums": { @@ -161,9 +161,9 @@ }, "com.google.guava:guava": { "shasums": { - "jar": "12429ff9ac33b7afd8b1a5071179757cf4d3c47f0f4099bc0384e644ecbf82dd" + "jar": "bd7fa227591fb8509677d0d1122cf95158f3b8a9f45653f58281d879f6dc48c5" }, - "version": "32.0.1-android" + "version": "32.0.1-jre" }, "com.google.guava:listenablefuture": { "shasums": { diff --git a/rules/android_lint.bzl b/rules/android_lint.bzl index 9a37259..7e2ad19 100644 --- a/rules/android_lint.bzl +++ b/rules/android_lint.bzl @@ -34,8 +34,7 @@ android_lint = rule( implementation = _impl, attrs = _dicts.add( _ATTRS, - dict( - ), + dict(), ), provides = [ _AndroidLintResultsInfo, diff --git a/rules/repositories.bzl b/rules/repositories.bzl index 9db8178..f7734df 100644 --- a/rules/repositories.bzl +++ b/rules/repositories.bzl @@ -1,8 +1,14 @@ -"""Declare runtime dependencies +"""Declare runtime dependencies. + +Dependencies are declared in MODULE.bazel via Bzlmod. """ -# buildifier: disable=unnamed-macro -def android_lint_register_toolchains(): +def android_lint_register_toolchains(name = "android_lint_toolchains"): """Convenience macro for users which does typical setup. + + This registers the default android_lint toolchain. + + Args: + name: Name for this macro invocation (unused, required by convention). """ - pass + native.register_toolchains("@rules_android_lint//toolchains:android_lint_default_toolchain") diff --git a/src/BUILD.bazel b/src/BUILD.bazel index 79735a4..955c7b8 100644 --- a/src/BUILD.bazel +++ b/src/BUILD.bazel @@ -1,3 +1,5 @@ +load("@rules_python//python:defs.bzl", "py_binary") + py_binary( name = "android_lint_output_validator", srcs = ["android_lint_output_validator.py"],