Priyansh Nama
07/15/2024, 9:57 AMAlex Styl
07/15/2024, 10:28 AMPriyansh Nama
07/15/2024, 10:35 AMPriyansh Nama
07/15/2024, 11:11 AMAlex Styl
07/15/2024, 11:39 AMChrimaeon
07/15/2024, 2:21 PMwithJava() in your androidTarget
https://kotlinlang.org/docs/multiplatform-dsl-reference.html#jvm-targetschrisjenx
07/15/2024, 2:54 PMchrisjenx
07/15/2024, 2:55 PMPriyansh Nama
07/17/2024, 3:56 PMPriyansh Nama
07/17/2024, 5:05 PMPriyansh Nama
07/17/2024, 5:06 PMchrisjenx
07/17/2024, 7:11 PMandroidMain can see jvmMain, but jvmMain can't see androidMain, same for desktopMain, and same that desktopMain can't see androidMain.
You can make pretty complex source set tree's if you really need too, but for sanitiy sake I would always just do common -> platform targets where possible to save you the world of implementation detail hellPriyansh Nama
07/18/2024, 4:58 AMPriyansh Nama
07/18/2024, 5:16 AMMcEna
07/18/2024, 2:57 PMchrisjenx
07/18/2024, 2:57 PMMcEna
07/18/2024, 2:57 PMMcEna
07/18/2024, 2:59 PMchrisjenx
07/18/2024, 3:03 PMkotlin {
jvm("desktop")
android()
applyDefaultHierarchyTemplate {
// create a new group that
// depends on `common`
common {
// Define group name without
// `Main` as suffix
group("dekstopAndAndroid") {
// Provide which targets would
// be part of this group
withJvm("desktop")
withAndroid()
}
}
}
// Now you will have `dekstopAndAndroidMain` source set
}