Is there way to create sth like `commonNativeMain`...
# kotlin-native
a
Is there way to create sth like
commonNativeMain
module for all native modules? If yes how, and how to access kotlin.native packages there. I tried using
Copy code
val commonNativeMain by creating { ... }
But that doesn't seem to access kotlin.native packages...
d
You need to add a dependant native sourceSet I think.
a
👀
Any Example?
k
Check out the gradle configuration in Okio. The hierarchy looks something like this
commonMain
|
nativeMain
/ | \
appleMain
linusMain
windowsMain
Sorry for the crap formatting lol
a
@kevin.cianfarini That doesn't seem to have any nativeMain dir in the sources, I know I could create a new sourceset as above, but don't know how to include the packages that are common (such as the Worker API)...
k
Sorry! I forgot about some changes that were made.
nonJvmMain
is the parent of every source set that's not the JVM. You can find what you're looking in the gradle config with nonJvmMain