Skip to content

Commit 52eaa8b

Browse files
committed
Update defaults and add toolchain to actions
1 parent b643a76 commit 52eaa8b

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

kotlin/internal/jvm/compile.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ def _fold_jars_action(ctx, rule_kind, toolchains, output_jar, input_jars, action
294294
"" if not action_type else " (%s)" % action_type,
295295
len(input_jars),
296296
),
297+
toolchain = _TOOLCHAIN_TYPE,
297298
)
298299

299300
def _resourcejar_args_action(ctx):
@@ -369,6 +370,7 @@ def _run_merge_jdeps_action(ctx, toolchains, jdeps, outputs, deps):
369370
args,
370371
],
371372
progress_message = progress_message,
373+
toolchain = _TOOLCHAIN_TYPE,
372374
)
373375

374376
def _run_kapt_builder_actions(
@@ -574,6 +576,7 @@ def _run_kt_builder_action(
574576
"LC_CTYPE": "en_US.UTF-8", # For Java source files
575577
"REPOSITORY_NAME": _utils.builder_workspace_name(ctx),
576578
},
579+
toolchain = _TOOLCHAIN_TYPE,
577580
)
578581

579582
# MAIN ACTIONS #########################################################################################################

kotlin/internal/toolchains.bzl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ _kt_toolchain = rule(
126126
),
127127
"language_version": attr.string(
128128
doc = "this is the -language_version flag [see](https://kotlinlang.org/docs/reference/compatibility.html)",
129-
default = "1.9",
129+
default = "2.1",
130130
values = [
131131
"1.1",
132132
"1.2",
@@ -138,11 +138,12 @@ _kt_toolchain = rule(
138138
"1.8",
139139
"1.9",
140140
"2.0",
141+
"2.1",
141142
],
142143
),
143144
"api_version": attr.string(
144145
doc = "this is the -api_version flag [see](https://kotlinlang.org/docs/reference/compatibility.html).",
145-
default = "1.9",
146+
default = "2.1",
146147
values = [
147148
"1.1",
148149
"1.2",
@@ -154,6 +155,7 @@ _kt_toolchain = rule(
154155
"1.8",
155156
"1.9",
156157
"2.0",
158+
"2.1",
157159
],
158160
),
159161
"debug": attr.string_list(
@@ -174,8 +176,8 @@ _kt_toolchain = rule(
174176
cfg = "target",
175177
),
176178
"jvm_target": attr.string(
177-
doc = "the -jvm_target flag. This is only tested at 1.8.",
178-
default = "1.8",
179+
doc = "the -jvm_target flag.",
180+
default = "11",
179181
values = [
180182
"1.6",
181183
"1.8",

0 commit comments

Comments
 (0)