My feeling is that custom source sets don’t really...
# multiplatform
e
My feeling is that custom source sets don’t really create separate compilation units under MPP, they just extend the default source sets but in the end get compiled into the same artifacts. Is this correct, or am I missing something?
d
Yes, this is correct.
e
Thanks! I’ll submit a feature request.
d
I just reread, unless you explicitly depend on a source set from a compilation, it doesn't get compiled.
e
In my experience, simply adding
dependsOn jvmMain
to a custom source set is not enough
The only thing that worked for me is having that source set
dependsOn commonMain
and then having
jvmMain { dependsOn customSourceSetMain }
h
@egorand take a look at having a custom compilation (
jvm { compilations { ... } }
), which actually is a separate compilation unit.
e
Oh, interesting, thanks!