Gamadril
06/04/2021, 8:37 AMandylamax
06/04/2021, 9:21 AMplugins {
kotlin("multiplatform")
// java - dont do this
}
Is enough to target both jvm and androidGamadril
06/04/2021, 9:31 AMkotlin {
jvm {
withJava()
}
}
the java plugin is always applied automatically by kotlin.multiplatform pluginmatej
06/04/2021, 9:41 AMjvmMain
and an androidMain
in the same project yet, you have to pick one.Gamadril
06/04/2021, 10:07 AMandylamax
06/04/2021, 10:09 AMjvmMain
and androidMain
plugins {
id("com.android.library")
kotlin("multiplatform")
}
kotlin {
android {}
jvm {
// withJava() - not allowed if android {} is present
}
}
hope that helpsCasey Brooks
06/04/2021, 1:51 PMGamadril
06/07/2021, 5:01 AMwithJava()
Casey Brooks
06/07/2021, 4:38 PMwithJava()
, you’ll still have access to all the Java stblib classes and any Java dependencies in your jvmMain
sourceset