Last active
October 11, 2024 11:06
-
-
Save domnikl/c19c7385927a7bef7217aa036a71d807 to your computer and use it in GitHub Desktop.
Gradle Kotlin DSL: set main class attribute for jar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks.withType<Jar> { | |
manifest { | |
attributes["Main-Class"] = "com.example.MainKt" | |
} | |
} |
thank you!!
Thank you!
thx
You can have a complete example on stackoverflow on how to set up your build.gradle.kts for it to work. Just that may not be enough to build your kotlin jar.
@sylhare mvp 👑, works great for the new gradle build.gradle.kts files
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thanks