Skip to content

Commit

Permalink
Use bzlmod in kotlin example (#7162)
Browse files Browse the repository at this point in the history
* use bzlmod in kotlin project

* Update simple_project.bazelproject
  • Loading branch information
mai93 authored Dec 17, 2024
1 parent 033983e commit 0db0c2d
Show file tree
Hide file tree
Showing 6 changed files with 1,565 additions and 3 deletions.
1 change: 1 addition & 0 deletions examples/kotlin/simple_project/.bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
common --legacy_external_runfiles #https://github.com/bazelbuild/rules_kotlin/issues/1241
1 change: 0 additions & 1 deletion examples/kotlin/simple_project/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ kt_jvm_test(
test_class = "test.lib.GreetingTest",
deps = [
":greeting_lib",
"@com_google_guava_guava//jar",
"@junit//jar",
"@truth//jar",
],
Expand Down
31 changes: 31 additions & 0 deletions examples/kotlin/simple_project/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
bazel_dep(
name = "rules_java",
version = "8.3.1",
)

bazel_dep(
name = "rules_kotlin",
version = "2.0.0",
)

bazel_dep(name = "rules_jvm_external", version = "6.6")

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
name = "maven",
artifacts = [
"junit:junit:4.13.2",
"com.google.truth:truth:1.4.4",
],
fail_if_repin_required = True,
generate_compat_repositories = True,
lock_file = "//:maven_install.json",
)

use_repo(
maven,
"maven",
"unpinned_maven",
junit = "junit_junit",
truth = "com_google_truth_truth",
)
Loading

0 comments on commit 0db0c2d

Please sign in to comment.