Skip to content

Commit 23c614b

Browse files
authored
Merge pull request #210 from salesforce/plaird/toolchains
add jartools_toolchains attribute
2 parents 84ffa1e + 3964bd7 commit 23c614b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

springboot/springboot.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,7 @@ def springboot(
388388
visibility = None,
389389
bazelrun_addopens = [],
390390
bazelrun_addexports = [],
391+
jartools_toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
391392
exclude = [], # deprecated
392393
classpath_index = "@rules_spring//springboot:empty.txt", # deprecated
393394
use_build_dependency_order = True, # deprecated
@@ -446,6 +447,7 @@ def springboot(
446447
tags: Optional. Bazel standard attribute.
447448
testonly: Optional. Bazel standard attribute. Defaults to False.
448449
visibility: Optional. Bazel standard attribute.
450+
jartools_toolchains: Optional. Toolchains for running build tools like singlejar, override for obscure use cases. Default: ["@bazel_tools//tools/jdk:current_java_runtime"]
449451
exclude: Deprecated synonym of *deps_exclude*
450452
classpath_index: Deprecated synonym of *deps_index_file*
451453
use_build_dependency_order: Deprecated synonym of *deps_use_starlark_order*
@@ -514,7 +516,7 @@ def springboot(
514516
outs = [genmanifest_out],
515517
tags = tags,
516518
testonly = testonly,
517-
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"], # so that JAVABASE is computed
519+
toolchains = jartools_toolchains, # so that JAVABASE is computed
518520
)
519521

520522
# SUBRULE 2B: GENERATE THE GIT PROPERTIES
@@ -577,7 +579,7 @@ def springboot(
577579
tags = tags,
578580
testonly = testonly,
579581
outs = [_get_springboot_jar_file_name(name)],
580-
toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"], # so that JAVABASE is computed
582+
toolchains = jartools_toolchains, # so that JAVABASE is computed
581583
visibility = visibility,
582584
)
583585

springboot/springboot_doc.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Note that the rule README has more detailed usage instructions for each attribut
4545
| tags | Optional. Bazel standard attribute. | <code>[]</code> |
4646
| testonly | Optional. Bazel standard attribute. Defaults to False. | <code>False</code> |
4747
| visibility | Optional. Bazel standard attribute. | <code>None</code> |
48+
| jartools_toolchains | Optional. Toolchains for running build tools like singlejar, override for obscure use cases. | <code>["@bazel_tools//tools/jdk:current_java_runtime"]</code> |
4849
| exclude | Deprecated synonym of *deps_exclude* | <code>[]</code> |
4950
| classpath_index | Deprecated synonym of *deps_index_file* | <code>"@rules_spring//springboot:empty.txt"</code> |
5051
| use_build_dependency_order | Deprecated synonym of *deps_use_starlark_order* | <code>True</code> |

0 commit comments

Comments
 (0)