Has the new Android Source Set v2 layout in Kotlin...
# multiplatform
d
Has the new Android Source Set v2 layout in Kotlin
1.8.0
dropped support for flavoured variants? 👉🧵
👀 4
With v1, the Kotlin Multiplatform plugin would synthesize a source set for each Android flavour. Now in v2 variants appear to be ignored and we only get the
main
,
unitTest
and
instrumentedTest
source-sets. v1 was already somewhat broken because it didn't generate source-sets for flavor permutations; but rather than fix this v2 seems to have gone the other way and broken it completely! I don't see how this is addressed in the documentation either. Variant types are mentioned, but only variant-less examples are given. 😞
s
Hey Chris: What exactly is your issue? The change from v1 to v2 is that the source sets will be created when the variants are actually ready from android side. If you want to use Kotlin Source Sets that match Android falvors, you can use APIs like:
Copy code
sourceSets.invokeWhenCreated("androidFreeDebug") {
        
 }
181 Views