You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| <aid="kt_kotlinc_options-name"></a>name | A unique name for this target. | <ahref="https://bazel.build/concepts/labels#target-names">Name</a> | required ||
409
409
| <aid="kt_kotlinc_options-include_stdlibs"></a>include_stdlibs | Don't automatically include the Kotlin standard libraries into the classpath (stdlib and reflect). | String | optional |`"all"`|
410
410
| <aid="kt_kotlinc_options-java_parameters"></a>java_parameters | Generate metadata for Java 1.8+ reflection on method parameters. | Boolean | optional |`False`|
411
+
| <aid="kt_kotlinc_options-jvm_default"></a>jvm_default | Specifies how to generate JVM default methods for interface declarations with bodies. This is the stable replacement for x_jvm_default (-Xjvm-default). Available from Kotlin 2.2. Options: - 'off': Don't pass the flag (uses compiler default, which is 'enable' in Kotlin 2.2+). - 'enable': Generate default methods and DefaultImpls for compatibility. - 'no-compatibility': Generate default methods without DefaultImpls classes. - 'disable': Do not generate JVM default methods (was the default up to Kotlin 2.1). | String | optional |`"off"`|
411
412
| <aid="kt_kotlinc_options-jvm_target"></a>jvm_target | The target version of the generated JVM bytecode | String | optional |`""`|
| <aid="kt_kotlinc_options-x_annotation_default_target"></a>x_annotation_default_target | Change the default annotation targets for constructor properties: -Xannotation-default-target=first-only: use the first of the following allowed targets: '@param:', '@property:', '@field:'; -Xannotation-default-target=first-only-warn: same as first-only, and raise warnings when both '@param:' and either '@property:' or '@field:' are allowed; -Xannotation-default-target=param-property: use '@param:' target if applicable, and also use the first of either '@property:' or '@field:'; default: 'first-only-warn' in language version 2.2+, 'first-only' in version 2.1 and before. | String | optional |`"off"`|
| <aid="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 |`""`|
424
425
| <aid="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 |`""`|
425
426
| <aid="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 |`""`|
426
-
| <aid="kt_kotlinc_options-x_jvm_default"></a>x_jvm_default | Specifies that a JVM default method should be generated for non-abstract Kotlin interface member. | String | optional |`"off"`|
427
+
| <aid="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"`|
427
428
| <aid="kt_kotlinc_options-x_lambdas"></a>x_lambdas | Change codegen behavior of lambdas. Defaults to "class" (anonymous inner classes), which differs from Kotlin 2.x/Gradle default of "indy" (invokedynamic). Set to "indy" for Gradle-compatible bytecode. | String | optional |`"class"`|
428
429
| <aid="kt_kotlinc_options-x_multi_platform"></a>x_multi_platform | Enable experimental language support for multi-platform projects | Boolean | optional |`False`|
429
430
| <aid="kt_kotlinc_options-x_no_call_assertions"></a>x_no_call_assertions | Don't generate not-null assertions for arguments of platform types | Boolean | optional |`False`|
0 commit comments