-
Notifications
You must be signed in to change notification settings - Fork 236
Description
I'm stumbling across this restriction trying to write the most basic hello world application to verify our integration of the bazel rules was successful.
"main_class": attr.string(mandatory = True, doc = ""), |
This is composed of the simple source given below...
// hello_world_app.kt
fun main() {
println("Hello, World!")
}
and the BUILD file
kt_jvm_binary(
name = "hello_world_app",
srcs = ["hello_world_main.kt"],
)
That simple combination yields the mandatory attribute error
ERROR: /home/userX/orgY/repoQ/third_party/external/rules_kotlin/tests/BUILD:29:14: //third_party/external/rules_kotlin/tests:hello_world_app: missing value for mandatory attribute 'main_class' in 'kt_jvm_binary' rule
Is there something flawed or incomplete with the hello world example above that I'm missing, or perhaps this reveals some underlying Java dependency for these rules that isn't obvious from the surface of this all? What is the reason why a kotlin JVM binary would need a main class precisely? Sorry for the confusion, and lack of background I'm very new to the Kotlin language and and trying to see how much of the language is standalone and independent vs standing on the shoulders of Java.