https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
f

fkrauthan

03/10/2020, 5:59 PM
Hey is there any easy way to configure a executable fat JAR for a jvm target in a kotlin multiplatform gradle project (using kotlin DSL)
k

Kris Wong

03/10/2020, 6:01 PM
shadowJar plugin
f

fkrauthan

03/10/2020, 6:02 PM
I read online there suppose to be a way without shadowJar using just the multiplatform plugin and confoguring the `
Copy code
jvmJar
manifest?
plus there is a bug saying that shadowjar does not work with multiplatform: https://github.com/johnrengelman/shadow/issues/484
k

Kris Wong

03/10/2020, 6:08 PM
i've had it working using this:
Copy code
val target = kotlin.targets.jvm("myTarget")
    from(target.compilations["main"].output)
    val runtimeClasspath = target.compilations["main"].compileDependencyFiles as Configuration
    configurations = mutableListOf(runtimeClasspath)
more or less
f

fkrauthan

03/10/2020, 7:09 PM
I see for the shadowjar plugin?
7 Views