Could use a hand, does any one know why buildFatJa...
# ktor
Could use a hand, does any one know why buildFatJar seems to build the jar correctly but then it never runs, saying it can't find the main class, however runLocally runs fine locally? I'd prefer not to use shadow... my experience with gradle, if there is one thing I've learned, mixing plugins is futile and a brain murderer.
Copy code
register<Jar>("buildFatJar") {
    group = "application"
    manifest {
        attributes["Implementation-Title"] = "Gradle Jar File Example"
        attributes["Implementation-Version"] = archiveVersion
        attributes["Main-Class"] = ""
    from(main.output.classesDirs, main.compileDependencyFiles)
    with(jar.get() as CopySpec)
register<JavaExec>("runLocally") {
    group = "application"
    classpath = main.output.classesDirs
    classpath += main.compileDependencyFiles
It's generated? Its contents match your config?
Shadow actually works really well with the kotlin plugin, both normal JVM plugin and Multiplatform plugin (using
jvm { withJava() }
). I’ve personally set it up many times, and it’s nearly trivial and works flawlessly. Have you actually tried using it?
Not sure what version you are using... anyway, the withJava was missing so that was a major issue along with others I documented here (second solution down: I don' really understand what it is.