Skip to content

Commit

Permalink
Added kotlin support and hello world example (EngFlow#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
anfelbar authored Nov 10, 2022
1 parent 15f621e commit 163ad01
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
14 changes: 14 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,17 @@ load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_depe
go_rules_dependencies()

go_register_toolchains(version = "1.19.3")

http_archive(
name = "io_bazel_rules_kotlin",
sha256 = "a57591404423a52bd6b18ebba7979e8cd2243534736c5c94d35c89718ea38f94",
urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/v1.6.0/rules_kotlin_release.tgz"],
)

load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories")

kotlin_repositories()

load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")

kt_register_toolchains()
7 changes: 7 additions & 0 deletions kotlin/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
load("@io_bazel_rules_kotlin//kotlin:jvm.bzl", "kt_jvm_binary")

kt_jvm_binary(
name = "kotlin",
srcs = glob(["*.kt"]),
main_class = "example.MainKt",
)
5 changes: 5 additions & 0 deletions kotlin/Main.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package example

fun main() {
println("Hello, World!")
}

0 comments on commit 163ad01

Please sign in to comment.