diff options
author | Kotlin Google Eng <kotlin-google-eng@google.com> | 2023-10-07 08:06:25 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-10-07 08:06:59 -0700 |
commit | af85c80b1e10d66494b2cd84d131b11d3336a1f0 (patch) | |
tree | f06a2c1a1cf2ca1439c094f7686915d2c68af972 | |
parent | 98692d1c0681c6d531ac0514cb6e4c409c8a1a29 (diff) | |
download | bazelbuild-kotlin-rules-af85c80b1e10d66494b2cd84d131b11d3336a1f0.tar.gz |
Fix check in `jvm_compile.bzl` for `JavaToolchainInfo`
Once the provider is moved out of native bazel rules and re-implemented in Starlark, `type(java_toolchain)` will begin returning `struct`.
PiperOrigin-RevId: 571577978
Change-Id: Iaa434a643ffc15486601635db79b9b7554d95f71
-rw-r--r-- | kotlin/jvm_compile.bzl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kotlin/jvm_compile.bzl b/kotlin/jvm_compile.bzl index 58a2818..a0f3f4e 100644 --- a/kotlin/jvm_compile.bzl +++ b/kotlin/jvm_compile.bzl @@ -116,7 +116,7 @@ def kt_jvm_compile( if classpath_resources and rule_family != _RULE_FAMILY.JVM_LIBRARY: fail("resources attribute only allowed for jvm libraries") - if type(java_toolchain) != "JavaToolchainInfo": + if type(java_toolchain) == "Target": # Allow passing either a target or a provider until all callers are updated java_toolchain = java_toolchain[java_common.JavaToolchainInfo] |