Skip to content

Commit f9864ec

Browse files
Allow setting newer language versions in toolchain (#1367)
1 parent 124421e commit f9864ec

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

kotlin/internal/toolchains.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ _kt_toolchain = rule(
144144
"1.9",
145145
"2.0",
146146
"2.1",
147+
"2.2",
148+
"2.3",
147149
],
148150
),
149151
"api_version": attr.string(
@@ -161,6 +163,8 @@ _kt_toolchain = rule(
161163
"1.9",
162164
"2.0",
163165
"2.1",
166+
"2.2",
167+
"2.3",
164168
],
165169
),
166170
"debug": attr.string_list(

src/main/starlark/core/options/opts.kotlinc.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ default: 'first-only-warn' in language version 2.2+, 'first-only' in version 2.1
430430
args = dict(
431431
default = "",
432432
doc = "The target version of the generated JVM bytecode",
433-
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "15", "16", "17"],
433+
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "15", "16", "17", "21"],
434434
),
435435
type = attr.string,
436436
value_to_flag = None,
@@ -442,7 +442,7 @@ default: 'first-only-warn' in language version 2.2+, 'first-only' in version 2.1
442442
doc = """Compile against the specified JDK API version, similarly to javac's '-release'. This requires JDK 9 or newer.
443443
The supported versions depend on the JDK used; for JDK 17+, the supported versions are 1.8 and 9–21.
444444
This also sets the value of '-jvm-target' to be equal to the selected JDK version.""",
445-
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "15", "16", "17"],
445+
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "15", "16", "17", "21"],
446446
),
447447
type = attr.string,
448448
value_to_flag = None,

0 commit comments

Comments
 (0)