Skip to content

Instantly share code, notes, and snippets.

@jfancher

jfancher/BUILD Secret

Created August 23, 2018 14:15
Show Gist options
  • Save jfancher/d9db1a94277ae898aa3c0e6e2a1e3483 to your computer and use it in GitHub Desktop.
Save jfancher/d9db1a94277ae898aa3c0e6e2a1e3483 to your computer and use it in GitHub Desktop.
Bazel/Kotlin Transitive Deps Issue #2
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kt_jvm_library")
kt_jvm_library(
name = "first",
srcs = ["C0.kt"],
)
kt_jvm_library(
name = "second",
srcs = ["C1.kt"],
deps = [":first"],
)
kt_jvm_library(
name = "third",
srcs = ["C2.kt"],
deps = [":second"],
)
package example
class C0 {}
package example
class C1 {
fun c(): C0 { return C0(); }
}
package example
class C2 {
fun c() { C1().c() }
}
kotlin_release_version="1.2.60"
rules_kotlin_version = "0f771d9229eae3858f7ed1034ec577c5b63b6939"
http_archive(
name = "io_bazel_rules_kotlin",
urls = ["https://github.com/bazelbuild/rules_kotlin/archive/%s.zip" % rules_kotlin_version],
type = "zip",
strip_prefix = "rules_kotlin-%s" % rules_kotlin_version
)
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kotlin_repositories", "kt_register_toolchains")
kotlin_repositories(kotlin_release_version=kotlin_release_version)
kt_register_toolchains()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment