Skip to content

Commit

Permalink
Update the load statements for Bazel's kotlin rules.
Browse files Browse the repository at this point in the history
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: 686356303
  • Loading branch information
bcorso authored and Dagger Team committed Oct 16, 2024
1 parent 8f13931 commit 5845ba1
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion java/dagger/hilt/processor/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion java/dagger/hilt/processor/internal/root/ir/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down
2 changes: 1 addition & 1 deletion java/dagger/lint/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion java/dagger/spi/model/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion java/dagger/testing/compile/macros.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion javatests/dagger/functional/kotlin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion javatests/dagger/functional/kotlin/processor/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down
2 changes: 1 addition & 1 deletion javatests/dagger/internal/codegen/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion javatests/dagger/lint/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"])

Expand Down
2 changes: 1 addition & 1 deletion test_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
)
Expand Down
2 changes: 1 addition & 1 deletion third_party/kotlin/build_extensions/rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 5845ba1

Please sign in to comment.