Skip to content
Merged
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
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,4 @@ use_repo(maven, "maven", "maven_android", "maven_conformance")
non_module_dependencies = use_extension("//:repositories.bzl", "non_module_dependencies")
use_repo(non_module_dependencies, "antlr4_jar")
use_repo(non_module_dependencies, "bazel_common")
use_repo(non_module_dependencies, "cel_policy")
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ java_library(
"@maven//:junit_junit",
],
)

cel_policy_conformance_test_java(
name = "policy_conformance_tests",
testdata = "@cel_policy//conformance:testdata",
)
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ def cel_policy_conformance_test_java(
"""

lbl = native.package_relative_label(testdata)
testdata_dir = lbl.package + "/" + lbl.name

# Under Bzlmod, external repository runfiles are located in sibling directories
# named after their canonical repository name.
repo_prefix = "../" + lbl.workspace_name + "/" if lbl.workspace_name else ""
testdata_dir = repo_prefix + lbl.package + "/" + lbl.name

java_test(
name = name,
Expand Down
11 changes: 11 additions & 0 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,20 @@ def bazel_common_dependency():
url = "https://github.com/google/bazel-common/archive/%s.tar.gz" % bazel_common_tag,
)

def cel_policy_dependency():
cel_policy_tag = "569292f1c4eaa41894c1e37ee94eb146e284bcfa"
cel_policy_sha = "5a68318d906f6ce18492ad6f82b5f8bb083fd9d694cf567d399216c11da03157"
http_archive(
name = "cel_policy",
sha256 = cel_policy_sha,
strip_prefix = "cel-policy-%s" % cel_policy_tag,
url = "https://github.com/cel-expr/cel-policy/archive/%s.tar.gz" % cel_policy_tag,
)

def _non_module_dependencies_impl(_ctx):
antlr4_jar_dependency()
bazel_common_dependency()
cel_policy_dependency()

non_module_dependencies = module_extension(
implementation = _non_module_dependencies_impl,
Expand Down
Loading