diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2019-11-26 12:17:52 +0900 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-11-26 08:43:34 +0100 |
commit | 7554bdfad5be0eff0b95dcfcec11a2cb19883b18 (patch) | |
tree | 2589c9d96fc5ec44dcd7432f649d059555565f8f /tools | |
parent | 2c5ed560c925fba9700d97390a9ffe44426f758f (diff) | |
download | jgit-7554bdfad5be0eff0b95dcfcec11a2cb19883b18.tar.gz jgit-7554bdfad5be0eff0b95dcfcec11a2cb19883b18.zip |
Bazel: Use java_plugin and java_binary from @rules_java in jmh.bzl
Change-Id: I80456f74bc17a1ebb0248fce8050a4cb07bf18f1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bzl/jmh.bzl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tools/bzl/jmh.bzl b/tools/bzl/jmh.bzl index eee9ed02c6..a51a42cf33 100644 --- a/tools/bzl/jmh.bzl +++ b/tools/bzl/jmh.bzl @@ -41,6 +41,8 @@ # Definitions to run jmh microbenchmarks +load("@rules_java//java:defs.bzl", "java_binary", "java_plugin") + def jmh_java_benchmarks(name, srcs, deps = [], tags = [], plugins = [], **kwargs): """Builds runnable JMH benchmarks. This rule builds a runnable target for one or more JMH benchmarks @@ -48,14 +50,14 @@ def jmh_java_benchmarks(name, srcs, deps = [], tags = [], plugins = [], **kwargs except for main_class. """ plugin_name = "_{}_jmh_annotation_processor".format(name) - native.java_plugin( + java_plugin( name = plugin_name, deps = ["//lib/jmh:jmh"], processor_class = "org.openjdk.jmh.generators.BenchmarkProcessor", visibility = ["//visibility:private"], tags = tags, ) - native.java_binary( + java_binary( name = name, srcs = srcs, main_class = "org.openjdk.jmh.Main", @@ -63,4 +65,4 @@ def jmh_java_benchmarks(name, srcs, deps = [], tags = [], plugins = [], **kwargs plugins = plugins + [plugin_name], tags = tags, **kwargs - )
\ No newline at end of file + ) |