Andrey Larionov
12/10/2023, 7:23 AMdependsOn()
in any sourceSet remove the blue folder icon from iosMain
? Now:
1. iosMain
is only visible in Project View
2. There is no syntax highlighting
3. The iosApp
configuration cannot be run
AGP = 8.2.0
KMP = 1.9.20-RC2Jeff Lockhart
12/10/2023, 8:07 AMdependsOn
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.Andrey Larionov
12/10/2023, 10:31 AM