Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ load("@rules_kotlin//kotlin:core.bzl", "define_kt_toolchain")
define_kt_toolchain(
name = "kotlin_toolchain",
api_version = KOTLIN_LANGUAGE_LEVEL, # "1.9", "2.0", "2.1", "2.2", or "2.3"
jvm_target = JAVA_LANGUAGE_LEVEL, # "1.8", "9", "10", "11", "12", "13", "15", "16", "17", "18", "19", "20", "21", or "22"
jvm_target = JAVA_LANGUAGE_LEVEL, # "1.8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", or "25"
language_version = KOTLIN_LANGUAGE_LEVEL, # "1.9", "2.0", "2.1", "2.2", or "2.3"
)
```
Expand Down
2 changes: 1 addition & 1 deletion docs/kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ Define kotlin compiler options.
| <a id="kt_kotlinc_options-x_enable_incremental_compilation"></a>x_enable_incremental_compilation | Enable incremental compilation | Boolean | optional | `False` |
| <a id="kt_kotlinc_options-x_explicit_api_mode"></a>x_explicit_api_mode | Enable explicit API mode for Kotlin libraries. | String | optional | `"off"` |
| <a id="kt_kotlinc_options-x_inline_classes"></a>x_inline_classes | Enable experimental inline classes | Boolean | optional | `False` |
| <a id="kt_kotlinc_options-x_jdk_release"></a>x_jdk_release | Compile against the specified JDK API version, similarly to javac's '-release'. This requires JDK 9 or newer. The supported versions depend on the JDK used; for JDK 17+, the supported versions are 1.8 and 9-21. This also sets the value of '-jvm-target' to be equal to the selected JDK version. | String | optional | `""` |
| <a id="kt_kotlinc_options-x_jdk_release"></a>x_jdk_release | Compile against the specified JDK API version, similarly to javac's '-release'. This requires JDK 9 or newer. The supported versions depend on the JDK used; for JDK 25+, the supported versions are 1.8 and 9-25. This also sets the value of '-jvm-target' to be equal to the selected JDK version. | String | optional | `""` |
| <a id="kt_kotlinc_options-x_jspecify_annotations"></a>x_jspecify_annotations | Controls how JSpecify annotations are treated. Options are 'default', 'ignore', 'warn', and 'strict'. | String | optional | `""` |
| <a id="kt_kotlinc_options-x_jsr_305"></a>x_jsr_305 | Specifies how to handle JSR-305 annotations in Kotlin code. Options are 'default', 'ignore', 'warn', and 'strict'. | String | optional | `""` |
| <a id="kt_kotlinc_options-x_jvm_default"></a>x_jvm_default | DEPRECATED: Use jvm_default instead for Kotlin 2.2+. Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. Migration to jvm_default: - x_jvm_default=all -> jvm_default=no-compatibility - x_jvm_default=all-compatibility -> jvm_default=enable - x_jvm_default=disable -> jvm_default=disable | String | optional | `"off"` |
Expand Down
4 changes: 4 additions & 0 deletions kotlin/internal/toolchains.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ _kt_toolchain = rule(
"19",
"20",
"21",
"22",
"23",
"24",
"25",
],
),
"kotlin_home": attr.label(
Expand Down
6 changes: 3 additions & 3 deletions src/main/starlark/core/options/opts.kotlinc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Options:
args = dict(
default = "",
doc = "The target version of the generated JVM bytecode",
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "15", "16", "17", "21"],
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25"],
),
type = attr.string,
value_to_flag = None,
Expand Down Expand Up @@ -254,9 +254,9 @@ default: 'first-only-warn' in language version 2.2+, 'first-only' in version 2.1
args = dict(
default = "",
doc = """Compile against the specified JDK API version, similarly to javac's '-release'. This requires JDK 9 or newer.
The supported versions depend on the JDK used; for JDK 17+, the supported versions are 1.8 and 9-21.
The supported versions depend on the JDK used; for JDK 25+, the supported versions are 1.8 and 9-25.
This also sets the value of '-jvm-target' to be equal to the selected JDK version.""",
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "15", "16", "17", "21"],
values = ["1.6", "1.8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25"],
),
type = attr.string,
value_to_flag = None,
Expand Down