From 5f0cd124243daf7ec28f45d08cc7488c6784a025 Mon Sep 17 00:00:00 2001 From: Brad Corso Date: Tue, 15 Oct 2024 14:52:56 -0700 Subject: [PATCH] Update the load statements for Bazel's kotlin rules. The open source rules were being loaded from a deprecated package and causing a number of build warnings like the following: ``` DEBUG: /.../io_bazel_rules_kotlin/kotlin/kotlin.bzl:116:10: kt_jvm_test should be loaded from //kotlin:jvm.bzl ``` RELNOTES=N/A PiperOrigin-RevId: 686248105 --- java/dagger/hilt/android/processor/internal/viewmodel/BUILD | 2 +- java/dagger/hilt/processor/internal/BUILD | 2 +- java/dagger/hilt/processor/internal/root/ir/BUILD | 2 +- java/dagger/lint/BUILD | 2 +- java/dagger/spi/model/BUILD | 2 +- java/dagger/testing/compile/macros.bzl | 2 +- javatests/dagger/functional/kotlin/BUILD | 2 +- javatests/dagger/functional/kotlin/processor/BUILD | 2 +- .../dagger/hilt/android/processor/internal/viewmodel/BUILD | 2 +- javatests/dagger/internal/codegen/BUILD | 2 +- javatests/dagger/lint/BUILD | 2 +- test_defs.bzl | 2 +- third_party/kotlin/build_extensions/rules.bzl | 2 +- 13 files changed, 13 insertions(+), 13 deletions(-) diff --git a/java/dagger/hilt/android/processor/internal/viewmodel/BUILD b/java/dagger/hilt/android/processor/internal/viewmodel/BUILD index 9e5dc9e619e..6c01d3c7b85 100644 --- a/java/dagger/hilt/android/processor/internal/viewmodel/BUILD +++ b/java/dagger/hilt/android/processor/internal/viewmodel/BUILD @@ -14,7 +14,7 @@ # Description: # ViewModelInject processor. -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("@rules_java//java:defs.bzl", "java_plugin") package(default_visibility = ["//:src"]) diff --git a/java/dagger/hilt/processor/internal/BUILD b/java/dagger/hilt/processor/internal/BUILD index 6bcfbc978ac..cd83d83df9c 100644 --- a/java/dagger/hilt/processor/internal/BUILD +++ b/java/dagger/hilt/processor/internal/BUILD @@ -15,7 +15,7 @@ # Description: # Internal code for implementing Hilt processors. -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("@rules_java//java:defs.bzl", "java_library") package(default_visibility = ["//:src"]) diff --git a/java/dagger/hilt/processor/internal/root/ir/BUILD b/java/dagger/hilt/processor/internal/root/ir/BUILD index 4bc1a29a2ae..33f580338e7 100644 --- a/java/dagger/hilt/processor/internal/root/ir/BUILD +++ b/java/dagger/hilt/processor/internal/root/ir/BUILD @@ -16,7 +16,7 @@ # A library containing intermediate representations of the various Hilt # aggregating annotations along with logic to process them. -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") package(default_visibility = ["//:src"]) diff --git a/java/dagger/lint/BUILD b/java/dagger/lint/BUILD index 2d95571de86..1e11aa2c7bf 100644 --- a/java/dagger/lint/BUILD +++ b/java/dagger/lint/BUILD @@ -15,7 +15,7 @@ # Description: # Dagger Lint Rules -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//:build_defs.bzl", "POM_VERSION") load("//tools/maven:maven.bzl", "gen_maven_artifact") diff --git a/java/dagger/spi/model/BUILD b/java/dagger/spi/model/BUILD index e5af4e50bd4..0dcd010d4db 100644 --- a/java/dagger/spi/model/BUILD +++ b/java/dagger/spi/model/BUILD @@ -15,7 +15,7 @@ # Description: # Dagger's core APIs exposed for plugins -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") package(default_visibility = [ # The dagger/spi should be the only direct dependent on this target. diff --git a/java/dagger/testing/compile/macros.bzl b/java/dagger/testing/compile/macros.bzl index 8283755076d..3338e8a13e6 100644 --- a/java/dagger/testing/compile/macros.bzl +++ b/java/dagger/testing/compile/macros.bzl @@ -14,7 +14,7 @@ """Macros for building compiler tests.""" load("@rules_java//java:defs.bzl", "java_binary", "java_test") -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") def compiler_test(name, size = "large", compiler_deps = None, **kwargs): """Generates a java_test that tests java compilation with the given compiler deps. diff --git a/javatests/dagger/functional/kotlin/BUILD b/javatests/dagger/functional/kotlin/BUILD index acc0504c331..345842dcfee 100644 --- a/javatests/dagger/functional/kotlin/BUILD +++ b/javatests/dagger/functional/kotlin/BUILD @@ -15,7 +15,7 @@ # Description: # Functional test code for Dagger-Android -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("@rules_java//java:defs.bzl", "java_library") load("//:test_defs.bzl", "GenJavaTests") diff --git a/javatests/dagger/functional/kotlin/processor/BUILD b/javatests/dagger/functional/kotlin/processor/BUILD index f4850079422..ec147bc7274 100644 --- a/javatests/dagger/functional/kotlin/processor/BUILD +++ b/javatests/dagger/functional/kotlin/processor/BUILD @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("@rules_java//java:defs.bzl", "java_plugin") package(default_visibility = ["//:src"]) diff --git a/javatests/dagger/hilt/android/processor/internal/viewmodel/BUILD b/javatests/dagger/hilt/android/processor/internal/viewmodel/BUILD index 421bc3ff8f4..b127124f55b 100644 --- a/javatests/dagger/hilt/android/processor/internal/viewmodel/BUILD +++ b/javatests/dagger/hilt/android/processor/internal/viewmodel/BUILD @@ -15,7 +15,7 @@ # Description: # Tests for internal code for implementing Hilt processors. -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("//java/dagger/testing/compile:macros.bzl", "kt_compiler_test") package(default_visibility = ["//:src"]) diff --git a/javatests/dagger/internal/codegen/BUILD b/javatests/dagger/internal/codegen/BUILD index 22c4daf0249..42d07a6e031 100644 --- a/javatests/dagger/internal/codegen/BUILD +++ b/javatests/dagger/internal/codegen/BUILD @@ -15,7 +15,7 @@ # Description: # Tests for the Dagger compiler/codegen -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library") load("@rules_java//java:defs.bzl", "java_library") load("//:build_defs.bzl", "DOCLINT_HTML_AND_SYNTAX") load("//:test_defs.bzl", "GenJavaTests") diff --git a/javatests/dagger/lint/BUILD b/javatests/dagger/lint/BUILD index 4252cca7601..21e1331b69d 100644 --- a/javatests/dagger/lint/BUILD +++ b/javatests/dagger/lint/BUILD @@ -15,7 +15,7 @@ # Description: # Tests for the Dagger Lint Rules -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_test") +load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_test") package(default_visibility = ["//:src"]) diff --git a/test_defs.bzl b/test_defs.bzl index bc98fc0f87c..da0becdb171 100644 --- a/test_defs.bzl +++ b/test_defs.bzl @@ -17,7 +17,7 @@ load("@rules_java//java:defs.bzl", "java_library", "java_test") load("//:build_defs.bzl", "JAVA_RELEASE_MIN") load( - "@io_bazel_rules_kotlin//kotlin:kotlin.bzl", + "@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_library", "kt_jvm_test", ) diff --git a/third_party/kotlin/build_extensions/rules.bzl b/third_party/kotlin/build_extensions/rules.bzl index f1d9b7c65dd..14aa4ef73bb 100644 --- a/third_party/kotlin/build_extensions/rules.bzl +++ b/third_party/kotlin/build_extensions/rules.bzl @@ -14,7 +14,7 @@ """Convenience wrapper for kt_android_library.""" -load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", io_kt_android_library = "kt_android_library") +load("@io_bazel_rules_kotlin//kotlin:android.bzl", io_kt_android_library = "kt_android_library") def kt_android_library(**kwargs): io_kt_android_library(**kwargs)