Swapnil Musale
04/19/2024, 11:48 AMdesktopMain
sourceSet from macosMain
sourceSet.
https://stackoverflow.com/questions/78352474/kotlin-multiplatform-access-file-from-different-sourcesetribesg
04/19/2024, 12:31 PMSwapnil Musale
04/19/2024, 12:35 PMribesg
04/19/2024, 12:41 PMDevanshu Pathsariya
04/19/2024, 1:41 PMSwapnil Musale
04/19/2024, 1:43 PMDevanshu Pathsariya
04/19/2024, 1:48 PMkotlin {
sourceSets {
val appleMain by getting
val desktopMain by getting
val desktopCommon by creating {
appleMain.dependsOn(this)
desktopMain.dependsOn(this)
}
}
}
Now you will have a new source-set and you can common code just like you would in commonMain
source-set, only difference is code will be accessible only in appleMain
and desktopMain
and you need to write actual implementation in appleMain
and desktopMain
if you create a expectSwapnil Musale
04/19/2024, 2:10 PMDevanshu Pathsariya
04/19/2024, 2:12 PMSwapnil Musale
04/19/2024, 2:13 PMribesg
04/19/2024, 2:41 PMSwapnil Musale
04/19/2024, 5:21 PM