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 PM
Nevermind, I just had my source sets screwed up! If anyone else runs into this, you can make an additional source set with
create("<name>")
and add
dependsOn("<name>")
to any targets you want to use that default implementation.
Ex:
Copy code
val jvmSharedMain = create("jvmSharedMain"){}
val jvmMain by getting {
dependsOn(jvmSharedMain)
}
val androidMain by getting {
dependsOn(jvmSharedMain)
}
👍 1
a
Andrew Reed
08/14/2023, 6:39 AM
exactly, it follows a similar pattern to iosMain
m
Michael Paus
08/14/2023, 12:40 PM
If you only have
jvm
and
android
targets and you are not planning to add further targets in the future you can also just remove this