Convert to bzlmod Convert the project bzlmod using the latest Gerrit master definition template. Co-Authored-By: Daniele Sassoli <danielesassoli@gmail.com> Change-Id: I8a7bbf4de18bbe23a2f31610fa6db68459cfac43
diff --git a/.gitignore b/.gitignore index 1293c82..d6a9ee4 100644 --- a/.gitignore +++ b/.gitignore
@@ -7,3 +7,4 @@ /bazel-* /eclipse-out/ .DS_Store +.bazelversion
diff --git a/BUILD b/BUILD index 1476f00..944083b 100644 --- a/BUILD +++ b/BUILD
@@ -1,5 +1,9 @@ -load("//tools/bzl:junit.bzl", "junit_tests") -load("//tools/bzl:plugin.bzl", "PLUGIN_DEPS", "PLUGIN_DEPS_NEVERLINK", "PLUGIN_TEST_DEPS", "gerrit_plugin") +load( + "@com_googlesource_gerrit_bazlets//:gerrit_plugin.bzl", + "gerrit_plugin", + "gerrit_plugin_tests", +) +load("@rules_java//java:defs.bzl", "java_library") gerrit_plugin( name = "owners-autoassign", @@ -13,7 +17,7 @@ "Gerrit-PluginName: owners-autoassign", "Gerrit-Module: com.googlesource.gerrit.owners.common.AutoassignModule", ], - resources = glob(["src/main/**/*"]), + resources = glob(["src/main/resources/**/*"]), deps = [ ":owners-common-api-neverlink", ], @@ -22,30 +26,14 @@ java_library( name = "owners-common-api-neverlink", neverlink = 1, - exports = [ - "//plugins/owners-common-api", - ], + exports = ["//plugins/owners-common-api"], ) -java_library( - name = "owners-autoassign_deps", - srcs = glob([ - "src/main/java/**/*.java", - ]), - visibility = ["//visibility:public"], - exports = [ - "//plugins/owners-common-api", - ], - deps = PLUGIN_DEPS_NEVERLINK + [ - "//plugins/owners-common-api", - ], -) - -junit_tests( +gerrit_plugin_tests( name = "owners_autoassign_tests", - testonly = 1, srcs = glob(["src/test/java/**/*.java"]), - deps = PLUGIN_DEPS + PLUGIN_TEST_DEPS + [ - ":owners-autoassign_deps", + plugin = "owners-autoassign", + deps = [ + "//plugins/owners-common-api", ], )
diff --git a/README.md b/README.md index cea2d50..93497a3 100644 --- a/README.md +++ b/README.md
@@ -43,7 +43,7 @@ cd gerrit/plugins ln -s ../../owners . ln -s ../../owners-common-api . - ln -sf owners-common-api/external_plugin_deps.bzl . + ln -sf owners-common-api/external_plugin_deps.bzl.MODULE.bazel . cd .. bazel build plugins/owners-autoassign ```
diff --git a/owners-autoassign_third_party_runtime_jars.allowlist.txt b/owners-autoassign_third_party_runtime_jars.allowlist.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/owners-autoassign_third_party_runtime_jars.allowlist.txt