mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[build] IJI-2993 add support progressive mode for Kotlin in Bazel
GitOrigin-RevId: 5a3158042439544eafd8117ac411ba1b29b81d71
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8e77f9ffe3
commit
cd2198e66a
@@ -2,7 +2,7 @@ load("@rules_kotlin//kotlin:jvm.bzl", "kt_javac_options")
|
||||
load("@rules_jvm//:jvm.bzl", "kt_kotlinc_options")
|
||||
|
||||
# We set default options for IntelliJ project
|
||||
def create_kotlinc_options(name, jvm_target = "21", api_version = "2.3", language_version = "2.3", opt_in = ["com.intellij.openapi.util.IntellijInternalApi"], plugin_options = [], warn = "off", x_allow_kotlin_package = False, x_allow_result_return_type = False, x_allow_unstable_dependencies = False, x_consistent_data_class_copy_visibility = False, x_context_parameters = False, x_context_receivers = False, x_explicit_api_mode = "disable", x_inline_classes = False, x_jvm_default = "all", x_lambdas = "indy", x_no_call_assertions = False, x_no_param_assertions = False, x_sam_conversions = "indy", x_skip_prerelease_check = False, x_strict_java_nullability_assertions = False, x_wasm_attach_js_exception = False, x_wasm_kclass_fqn = False, x_when_guards = False, x_x_language = ["+AllowEagerSupertypeAccessibilityChecks"]):
|
||||
def create_kotlinc_options(name, jvm_target = "21", api_version = "2.3", language_version = "2.3", opt_in = ["com.intellij.openapi.util.IntellijInternalApi"], plugin_options = [], progressive = False, warn = "off", x_allow_kotlin_package = False, x_allow_result_return_type = False, x_allow_unstable_dependencies = False, x_consistent_data_class_copy_visibility = False, x_context_parameters = False, x_context_receivers = False, x_explicit_api_mode = "disable", x_inline_classes = False, x_jvm_default = "all", x_lambdas = "indy", x_no_call_assertions = False, x_no_param_assertions = False, x_sam_conversions = "indy", x_skip_prerelease_check = False, x_strict_java_nullability_assertions = False, x_wasm_attach_js_exception = False, x_wasm_kclass_fqn = False, x_when_guards = False, x_x_language = ["+AllowEagerSupertypeAccessibilityChecks"]):
|
||||
kt_kotlinc_options(
|
||||
name = name,
|
||||
jvm_target = jvm_target,
|
||||
@@ -10,6 +10,7 @@ def create_kotlinc_options(name, jvm_target = "21", api_version = "2.3", languag
|
||||
language_version = language_version,
|
||||
opt_in = opt_in,
|
||||
plugin_options = plugin_options,
|
||||
progressive = progressive,
|
||||
visibility=["//visibility:public"],
|
||||
warn = warn,
|
||||
x_allow_kotlin_package = x_allow_kotlin_package,
|
||||
|
||||
+1
@@ -21,6 +21,7 @@ public enum CLFlags {
|
||||
PLUGIN_ID,
|
||||
PLUGIN_CLASSPATH,
|
||||
PLUGIN_OPTIONS,
|
||||
PROGRESSIVE,
|
||||
|
||||
OUT,
|
||||
ABI_OUT,
|
||||
|
||||
+1
@@ -385,6 +385,7 @@ public class KotlinCompilerRunner implements CompilerRunner {
|
||||
if (languageVersion != null) {
|
||||
arguments.setLanguageVersion(languageVersion);
|
||||
}
|
||||
arguments.setProgressiveMode(CLFlags.PROGRESSIVE.isFlagSet(flags));
|
||||
String explicitApiMode = CLFlags.X_EXPLICIT_API_MODE.getOptionalScalarValue(flags);
|
||||
if (explicitApiMode != null) {
|
||||
arguments.setExplicitApi(explicitApiMode);
|
||||
|
||||
@@ -267,6 +267,17 @@ _KOPTS = {
|
||||
True: ["-Xno-param-assertions"],
|
||||
},
|
||||
),
|
||||
"progressive": struct(
|
||||
flag = "-progressive",
|
||||
args = dict(
|
||||
default = False,
|
||||
doc = "Enable the progressive mode for the compiler",
|
||||
),
|
||||
type = attr.bool,
|
||||
value_to_flag = {
|
||||
True: ["-progressive"],
|
||||
},
|
||||
),
|
||||
"x_sam_conversions": struct(
|
||||
flag = "-Xsam-conversions",
|
||||
args = dict(
|
||||
|
||||
Reference in New Issue
Block a user