Skip to content

Commit

Permalink
[Bzlmod] Remove old workspace support (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bencodes authored Apr 27, 2024
1 parent d1203e6 commit e91ebd4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
2 changes: 1 addition & 1 deletion rules/extensions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
load(":repositories.bzl", "android_lint_register_toolchains")

def _toolchain_extension(_):
android_lint_register_toolchains(register = False)
android_lint_register_toolchains()

android_lint = module_extension(
implementation = _toolchain_extension,
Expand Down
26 changes: 2 additions & 24 deletions rules/repositories.bzl
Original file line number Diff line number Diff line change
@@ -1,30 +1,8 @@
"""Declare runtime dependencies
"""

load("@bazel_tools//tools/build_defs/repo:http.bzl", _http_archive = "http_archive")
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")

def _http_archive(name, **kwargs):
maybe(_http_archive, name = name, **kwargs)

def rules_android_lint_dependencies():
# The minimal version of bazel_skylib we require
_http_archive(
name = "bazel_skylib",
sha256 = "cd55a062e763b9349921f0f5db8c3933288dc8ba4f76dd9416aac68acee3cb94",
urls = [
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.5.0.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.5.0/bazel-skylib-1.5.0.tar.gz",
],
)

# buildifier: disable=unnamed-macro
def android_lint_register_toolchains(register = True):
def android_lint_register_toolchains():
"""Convenience macro for users which does typical setup.
Args:
register: Whether to register the toolchain. If False, the user must
register it themselves.
"""
if register:
native.register_toolchains("//toolchains:android_lint_default_toolchain")
pass

0 comments on commit e91ebd4

Please sign in to comment.