Garrison Henkle
08/13/2023, 7:57 PMjvm and android targets, is there a way for the android implementation to default to the jvm target’s implementation for certain expect functions?Garrison Henkle
08/13/2023, 7:58 PMactual implementations are identical on both targets, so it’d be convenient and remove a lot of duplicated code.Garrison Henkle
08/13/2023, 8:08 PMcreate("<name>") and add dependsOn("<name>") to any targets you want to use that default implementation.
Ex:
val jvmSharedMain = create("jvmSharedMain"){}
val jvmMain by getting {
dependsOn(jvmSharedMain)
}
val androidMain by getting {
dependsOn(jvmSharedMain)
}Andrew Reed
08/14/2023, 6:39 AMMichael Paus
08/14/2023, 12:40 PMjvm and android targets and you are not planning to add further targets in the future you can also just remove this expect/actual stuff and move the code to commonMain.