It's hard to say without seeing your full build configuration, but what I believe is the cause is that Kotlin 1.9.20 applies the
default hierarchy template by default, so long as you don't manually specify any source set
dependsOn
relationships. But if you do, then it no longer applies the default template and assumes you are defining your hierarchy entirely manually. And the
ios intermediate source set is defined by the default hierarchy template.
You can manually apply the default template with
applyDefaultHierarchyTemplate()
and then specify the additional
dependsOn
relationships. Alternatively, you could also use the experimental hierarchy tree API to add your additional source sets, e.g.:
@OptIn(ExperimentalKotlinGradlePluginApi::class)
applyDefaultHierarchyTemplate {
common {
group("platform") {
withAndroidTarget()
}
}
}
Side note, is there a reason you're still using the Kotlin RC2 version? Kotlin 1.9.20 and now 1.9.21 are both released now.