diff --git a/docs/kotlin.md b/docs/kotlin.md index 2d90c7af9..495c37e32 100755 --- a/docs/kotlin.md +++ b/docs/kotlin.md @@ -377,7 +377,8 @@ Define java compiler options for `kt_jvm_*` rules with java sources. load("@rules_kotlin//kotlin:core.bzl", "kt_kotlinc_options") kt_kotlinc_options(name, include_stdlibs, java_parameters, jvm_target, warn, - x_allow_result_return_type, x_assertions, x_backend_threads, x_context_receivers, + x_allow_result_return_type, x_assertions, x_backend_threads, + x_consistent_data_class_copy_visibility, x_context_receivers, x_emit_jvm_type_annotations, x_enable_incremental_compilation, x_explicit_api_mode, x_inline_classes, x_jdk_release, x_jspecify_annotations, x_jsr_305, x_jvm_default, x_lambdas, x_multi_platform, x_no_call_assertions, x_no_optimize, @@ -402,6 +403,7 @@ Define kotlin compiler options. | x_allow_result_return_type | Enable kotlin.Result as a return type | Boolean | optional | `False` | | x_assertions | Configures how assertions are handled. The 'jvm' option enables assertions in JVM code. | String | optional | `""` | | x_backend_threads | When using the IR backend, run lowerings by file in N parallel threads. 0 means use a thread per processor core. Default value is 1. | Integer | optional | `1` | +| x_consistent_data_class_copy_visibility | The effect of this compiler flag is the same as applying @ConsistentCopyVisibility annotation to all data classes in the module. See https://youtrack.jetbrains.com/issue/KT-11914 | Boolean | optional | `False` | | x_context_receivers | Enable experimental context receivers. | Boolean | optional | `False` | | x_emit_jvm_type_annotations | Basic support for type annotations in JVM bytecode. | Boolean | optional | `False` | | x_enable_incremental_compilation | Enable incremental compilation | Boolean | optional | `False` | diff --git a/src/main/starlark/core/options/opts.kotlinc.bzl b/src/main/starlark/core/options/opts.kotlinc.bzl index 5e1461ba4..ded858551 100644 --- a/src/main/starlark/core/options/opts.kotlinc.bzl +++ b/src/main/starlark/core/options/opts.kotlinc.bzl @@ -397,6 +397,16 @@ _KOPTS_ALL = { }, map_value_to_flag = None, ), + "x_consistent_data_class_copy_visibility": struct( + args = dict( + default = False, + doc = "The effect of this compiler flag is the same as applying @ConsistentCopyVisibility annotation to all data classes in the module. See https://youtrack.jetbrains.com/issue/KT-11914", + ), + type = attr.bool, + value_to_flag = { + True: ["-Xconsistent-data-class-copy-visibility"], + }, + ), "jvm_target": struct( args = dict( default = "",