From fae65cad8333db0ebc3d20fa24629e961bba5616 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nivaldo=20Bondan=C3=A7a?= Date: Sat, 18 May 2024 10:17:52 -0700 Subject: [PATCH] Make sure to default to K1 Summary: Honestly the `kotlin.use_k2` property is a bit misleading right now, since if you set it to true, then **maybe** you will use k2. I'm replacing it with something a bit more clear here, which I called `kotlin.language_version` ``` force_k1: Use K1 for all targets force_k2: Use K2 for all targets from_kotlin_version: K2 if on Kotlin 2.0+ (default of Kotlin) defined_by_target (default): Current state of things. The target `k2` param defines what frontend compiler to use, where `k2 == true` means to use K2 ``` ## Kotln 2.0 While Kotlin 2.0 has K2 as the default, this change will keep K1 as the default, which is what we want for now Reviewed By: pengj Differential Revision: D56069029 fbshipit-source-id: 0a701ce51899b4abf411aedb7ec3aee6fa820b4b --- kotlin/kotlincd_jar_creator.bzl | 2 -- 1 file changed, 2 deletions(-) diff --git a/kotlin/kotlincd_jar_creator.bzl b/kotlin/kotlincd_jar_creator.bzl index 912b63feb..772389461 100644 --- a/kotlin/kotlincd_jar_creator.bzl +++ b/kotlin/kotlincd_jar_creator.bzl @@ -103,8 +103,6 @@ def create_jar_artifact_kotlincd( jvm_abi_gen = None should_use_jvm_abi_gen = False - k2 = k2 and kotlin_toolchain.use_k2 - def encode_kotlin_extra_params(kotlin_compiler_plugins): kosabiPluginOptionsMap = {} if kotlin_toolchain.kosabi_stubs_gen_plugin != None: