From 7881d02b194b3734d6e54ec34e5fe86102090bf6 Mon Sep 17 00:00:00 2001 From: Ross Beazley Date: Thu, 19 Dec 2024 09:43:20 +0000 Subject: [PATCH] Add option to tag rule as kt_public_only_in_abi_plugin_incompatible --- kotlin/internal/jvm/compile.bzl | 2 +- kotlin/internal/toolchains.bzl | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kotlin/internal/jvm/compile.bzl b/kotlin/internal/jvm/compile.bzl index 04fde4503..48fc21214 100644 --- a/kotlin/internal/jvm/compile.bzl +++ b/kotlin/internal/jvm/compile.bzl @@ -536,7 +536,7 @@ def _run_kt_builder_action( omit_if_empty = True, ) - if toolchains.kt.experimental_use_public_only_abi_jars == True: + if not "kt_public_only_in_abi_plugin_incompatible" in ctx.attr.tags and toolchains.kt.experimental_use_public_only_abi_jars == True: args.add("--public_only_in_abi_jar", "true") args.add("--build_kotlin", build_kotlin) diff --git a/kotlin/internal/toolchains.bzl b/kotlin/internal/toolchains.bzl index 743c8f349..28a44fc60 100644 --- a/kotlin/internal/toolchains.bzl +++ b/kotlin/internal/toolchains.bzl @@ -205,11 +205,11 @@ _kt_toolchain = rule( ), "experimental_use_public_only_abi_jars": attr.bool( doc = """Compile using public only abi jars. - This effectively applies the following two compiler plugin options. - plugin:org.jetbrains.kotlin.jvm.abi:treatInternalAsPrivate=true - plugin:org.jetbrains.kotlin.jvm.abi:removePrivateClasses=true + This effectively applies the following two compiler plugin options: + plugin:org.jetbrains.kotlin.jvm.abi:treatInternalAsPrivate=true + plugin:org.jetbrains.kotlin.jvm.abi:removePrivateClasses=true Can be disabled for an individual target using the tag. - `kt_abi_plugin_incompatible`""", + `kt_public_only_in_abi_plugin_incompatible`""", default = False, ), "experimental_strict_kotlin_deps": attr.string(