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

tapchicoma

10/09/2018, 7:56 PM
does anyone has example that has new kotlin multiplatform plugin combined with application plugin?
t

thevery

10/09/2018, 8:23 PM
There should be built-in sample in IDEA EAP
h

h0tk3y

10/09/2018, 8:25 PM
The
application
plugin sets up its defaults relying on the
java
plugin, which is not applied by the
kotlin-multiplatform
plugin's
jvm
preset (it does not compile Java either). In Kotlin 1.3 RC, you can try to use the
presets.jvmWithJava
preset instead of
presets.jvm
, which will apply the
java
plugin and build Kotlin compilations according to the Java source sets. The
application
plugin should work with the target created from the
jvmWithJava
preset this way. Note, however, that this preset is most likely to be removed shortly in favor of another form of Java support.
t

tapchicoma

10/09/2018, 8:38 PM
yep, works 👍
g

gildor

10/10/2018, 2:53 AM
What kind Java support? Do you plan to have completely custom jvm build plugin that not based on Gradle Java plugin?
h

h0tk3y

10/10/2018, 12:12 PM
We haven't decided on that yet. We understand that some 3rd party JVM-related plugins require the
java
plugin to be applied, so not applying it would ruin interoperation with those plugins. We consider supporting it in the
jvm
preset, just not applying the
java
plugin by default and requiring it to be applied explicitly by a user if they need Java support, in which case we will setup Kotlin compilations of the JVM target accordingly (bind them to the Java source sets).