what is the easiest way to publish a multiplatform...
# multiplatform
c
what is the easiest way to publish a multiplatform version of a kotlin library? are there any libraries that have a nice multiplatform build (preferable with gradle kotlin dsl) that works on java, javascript and native that i can look at as an example?
👍 1
r
IDEA 2018.3 has a new project template that does this
c
i have a build file already i just want to convert it. but i'm going to look at what idea creates, thanks
that 2018.3 multiplatform library template uses gradle 4.7 and the gradle dsl. is it not yet possible to use the kotlin dsl?
r
I think it’s possible but it’s not simple. The
fromPreset
calls don’t work in the kotlin dsl. I think 1.3.20 will improve this, but I’ve largely been sticking to groovy scripts for the moment so I’m no expert there.
m
After 4.7 Gradle changed metadata format, and currently all official Jetbrains libs published from Grade 4.7 with old metadata.
r
yes, that’s a different issue. You can use 4.10 or 5.0 just fine if you don’t need to use any libs published with 4.7
c
ok so maybe its best to wait for 1.3.20
g
The
fromPreset
calls don’t work in the kotlin dsl
True, but this is workaround:
Copy code
targets.withGroovyBuilder {
        "fromPreset"(presets["android"], "android")
}