rules_kotlin icon indicating copy to clipboard operation
rules_kotlin copied to clipboard

Make `kt_jvm_binary` produce a *_deploy.jar implicit target

Open agluszak opened this issue 2 years ago • 1 comments

java_binary allows you to build a "fat jar" with all the dependencies bundled , but this is not possible with kt_jvm_binary

agluszak avatar Aug 23 '23 15:08 agluszak

A workaround is use java_binary, include your kt library in runtime_deps:

kt_jvm_library( name = "helloworld", srcs = [ "Main.kt", ], )

java_binary( name = "helloworld_main", main_class = "your.kotlin.app.Main", runtime_deps = [ ":helloworld", ], )

then use helloworld_main_deploy.jar

yuanbai avatar May 14 '25 03:05 yuanbai