https://kotlinlang.org logo
d

Djuro

06/22/2023, 7:37 PM
Hi everyone, I don’t know what happened but now whenever I create a KMM project from 🤖 studio in
common/build.gradle.kts
there is no
iosMain by creating
generated. Did anyone else face a similar issue?
Also, whenever I create it manually I get
Copy code
Cannot add a KotlinSourceSet with name 'iosMain' as a KotlinSourceSet with that name already exists.
j

Jeff Lockhart

06/22/2023, 7:52 PM
What's the build.gradle.kts that it generates? If the source set already exists, you can get it with
iosMain by getting
instead. The new KMP source set hierarchy APIs will create intermediate source sets automatically, without the need to use
by creating
and manually connect them with a bunch of
dependsOn()
calls. It's a much cleaner concise API that replaces target shortcuts.
d

Djuro

06/22/2023, 8:11 PM
Cool, good to know. I wasn’t aware of the update. I thought I screwed up something. It sure looks much cleaner now without manual connection 👍 Thank you Jeff
254 Views