Does the kotlin-multiplatform plugin create standa...
# multiplatform
n
Does the kotlin-multiplatform plugin create standard source-sets that are dependencies of all native targets? E.g. it creates the standard commonMain and commonTest source sets, which are dependencies of all targets, which can contain code that uses kotlin-stdlib-common. Is there equivalent for native targets, which relies on stdlib features common to all native platforms? (is that even a thing?)
i
You can use dependsOn with source sets. Create commonNative in sourceSets and depend on it
n
which dependency should I use in the commonNative source set to get stdlib definitions for all native platforms?
i
everything u need is already in common
n
Not in 1.3.20 it’s not. Common doesn’t have Char.isLetter, Char.isDigit, but they do exist on native platforms
m
Notice that Char.isDigit isn’t in Common, just in JVM and Native, so my solution is to create an extension function isDigitCommon declare it as expect and provide the specific implementation in JVM and Native modules
t
@natpryce did you find a solution?
n
I defined the source set and dependency relationships explicitly in the Gradle file