forked from bazelbuild/rules_scala
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Toolchainize //jmh/toolchain:jmh_toolchain_type
Adds the jmh toolchain to `scala_toolchains()` and moves `jmh_repositories()` to `jmh/toolchain/toolchain.bzl` for `rules_java` 8 compatibility. Part of bazelbuild#1482 and bazelbuild#1652.
- Loading branch information
Showing
6 changed files
with
127 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,10 @@ | ||
load("//scala:providers.bzl", "declare_deps_provider") | ||
load("//jmh/toolchain:toolchain.bzl", "export_toolchain_deps", "jmh_toolchain") | ||
|
||
jmh_toolchain( | ||
name = "jmh_toolchain_impl", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
toolchain( | ||
name = "jmh_toolchain", | ||
toolchain = ":jmh_toolchain_impl", | ||
toolchain_type = "@io_bazel_rules_scala//jmh/toolchain:jmh_toolchain_type", | ||
) | ||
|
||
declare_deps_provider( | ||
name = "jmh_core_provider", | ||
deps_id = "jmh_core", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@io_bazel_rules_scala_org_openjdk_jmh_jmh_core", | ||
], | ||
) | ||
|
||
declare_deps_provider( | ||
name = "jmh_classpath_provider", | ||
deps_id = "jmh_classpath", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@io_bazel_rules_scala_net_sf_jopt_simple_jopt_simple", | ||
"@io_bazel_rules_scala_org_apache_commons_commons_math3", | ||
], | ||
) | ||
|
||
declare_deps_provider( | ||
name = "benchmark_generator_provider", | ||
deps_id = "benchmark_generator", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"//src/java/io/bazel/rulesscala/jar", | ||
"@io_bazel_rules_scala_org_openjdk_jmh_jmh_core", | ||
"@io_bazel_rules_scala_org_openjdk_jmh_jmh_generator_asm", | ||
"@io_bazel_rules_scala_org_openjdk_jmh_jmh_generator_reflection", | ||
], | ||
) | ||
|
||
declare_deps_provider( | ||
name = "benchmark_generator_runtime_provider", | ||
deps_id = "benchmark_generator_runtime", | ||
visibility = ["//visibility:public"], | ||
deps = [ | ||
"@io_bazel_rules_scala_org_openjdk_jmh_jmh_generator_asm", | ||
], | ||
) | ||
|
||
export_toolchain_deps( | ||
name = "jmh_classpath", | ||
deps_id = "jmh_classpath", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
export_toolchain_deps( | ||
name = "jmh_core", | ||
deps_id = "jmh_core", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
export_toolchain_deps( | ||
name = "benchmark_generator", | ||
deps_id = "benchmark_generator", | ||
visibility = ["//visibility:public"], | ||
) | ||
|
||
export_toolchain_deps( | ||
name = "benchmark_generator_runtime", | ||
deps_id = "benchmark_generator_runtime", | ||
visibility = ["//visibility:public"], | ||
) | ||
load("//jmh/toolchain:toolchain.bzl", "DEP_PROVIDERS", "export_toolchain_deps") | ||
|
||
[ | ||
export_toolchain_deps( | ||
name = provider, | ||
deps_id = provider, | ||
visibility = ["//visibility:public"], | ||
) | ||
for provider in DEP_PROVIDERS | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters