Files
openide/build/compiler-options.bzl
Vladimir Krivosheev a1210118c0 bazel - fix JPMS, exports and internal
GitOrigin-RevId: 3dc80a9ee01e1900c0cebc24b2d08f04f93ddeff
2024-09-25 19:05:37 +00:00

29 lines
1017 B
Python

load("@rules_kotlin//kotlin:jvm.bzl", "kt_javac_options")
load("@rules_kotlin//kotlin:core.bzl", "kt_kotlinc_options")
def create_javac_options(name, release):
kt_javac_options(
name = name,
release = release,
x_ep_disable_all_checks = True,
visibility = ["//visibility:public"],
)
def create_kotlinc_options(name, jvm_target, x_optin = []):
kt_kotlinc_options(
name = name,
jvm_target = jvm_target,
x_enable_incremental_compilation = True,
x_optin = [
"com.intellij.openapi.util.IntellijInternalApi",
# it is unusual to have such opt-ins for the entire monorepo,
# but that is what JPS uses as the default - in bazel, let's not use it for all
#"org.jetbrains.kotlin.utils.addToStdlib.UnsafeCastFunction",
#"org.jetbrains.kotlin.analysis.api.KaIdeApi",
#"org.jetbrains.kotlin.analysis.api.KaNonPublicApi",
] + x_optin,
x_jvm_default = "all",
warn = "off",
visibility=["//visibility:public"],
include_stdlibs = "none",
)