From af85c80b1e10d66494b2cd84d131b11d3336a1f0 Mon Sep 17 00:00:00 2001 From: Kotlin Google Eng Date: Sat, 7 Oct 2023 08:06:25 -0700 Subject: 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 --- kotlin/jvm_compile.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kotlin/jvm_compile.bzl') 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] -- cgit v1.2.3 From 53879a257620503971d5474b61581aa8749fd9c3 Mon Sep 17 00:00:00 2001 From: nickreid Date: Mon, 9 Oct 2023 10:00:10 -0700 Subject: Run Android Lint iff there are files that need to be checked. PiperOrigin-RevId: 571967677 Change-Id: Id9fc00bd965877531eb617b11677a5dba7c7360d --- kotlin/jvm_compile.bzl | 3 --- 1 file changed, 3 deletions(-) (limited to 'kotlin/jvm_compile.bzl') diff --git a/kotlin/jvm_compile.bzl b/kotlin/jvm_compile.bzl index a0f3f4e..46a46af 100644 --- a/kotlin/jvm_compile.bzl +++ b/kotlin/jvm_compile.bzl @@ -39,7 +39,6 @@ def kt_jvm_compile( resource_files, exported_plugins, java_android_lint_config = None, - force_android_lint = False, # TODO Remove this param manifest = None, merged_manifest = None, classpath_resources = [], @@ -75,7 +74,6 @@ def kt_jvm_compile( resource_files: List of Files. The list of Android Resource files. exported_plugins: List of exported javac/kotlinc plugins java_android_lint_config: Android Lint XML config file to use if there are no Kotlin srcs - force_android_lint: Force AndroidLint action manifest: A File. The raw Android manifest. Optional. merged_manifest: A File. The merged Android manifest. Optional. classpath_resources: List of Files. The list of classpath resources (kt_jvm_library only). @@ -187,7 +185,6 @@ def kt_jvm_compile( ), ), java_android_lint_config = java_android_lint_config, - force_android_lint = force_android_lint, resource_files = resource_files, runtime_deps = [d[JavaInfo] for d in runtime_deps if JavaInfo in d], srcs = srcs, -- cgit v1.2.3 From 42895ed5c859cfd96dd5253aa46d462a770db834 Mon Sep 17 00:00:00 2001 From: nickreid Date: Tue, 10 Oct 2023 07:26:58 -0700 Subject: n/a PiperOrigin-RevId: 572241640 --- kotlin/jvm_compile.bzl | 2 ++ 1 file changed, 2 insertions(+) (limited to 'kotlin/jvm_compile.bzl') diff --git a/kotlin/jvm_compile.bzl b/kotlin/jvm_compile.bzl index 46a46af..be5fda0 100644 --- a/kotlin/jvm_compile.bzl +++ b/kotlin/jvm_compile.bzl @@ -20,6 +20,8 @@ load(":common.bzl", "common") load(":compiler_plugin.bzl", "KtCompilerPluginInfo") load(":traverse_exports.bzl", "kt_traverse_exports") +visibility(RULES_DEFS_THAT_COMPILE_KOTLIN) + _RULE_FAMILY = common.RULE_FAMILY def kt_jvm_compile( -- cgit v1.2.3