These are screenshots from two separate projects I...
# android-studio
e
These are screenshots from two separate projects I have. They both use the same versions of Kotlin, Gradle, etc... What would cause the difference between how
commonMain
is being treated by the IDE here?
e
They do not have the same build configuration. On the right
src/commonMain/kotlin
is added as a source root. Looks like custom configuration either directly in the build scripts or from a plugin.
e
The projects are using the exact same configuration
After I restarted the IDE they both look like the one on the left ¯\_(ツ)_/¯
🤔 1
e
Very curious. I guess it was a fluke.
m
I had the same thing happen yesterday with Intellij. Created a new module but it wouldn't recognize commonMain (other directories worked) but a closing and reopening of the project fixed it.
z
@eygraber do you do any management of source sets in your build file? such as using compose-resources and making them visible to android variants via something like
sourceSets["main"].resources.srcDirs("src/commonMain/resources")
? That was the issue for me
e
It's possible I do that in one of my convention plugins that the project uses. I'll check that out, thanks
I do have some code that manages the source set in a convention plugin, but for this project none of those paths should get hit
z
¯\_(ツ)_/¯
e
I'm just chalking it up to Android Studio getting some wires crossed. Everything has been fine since then (and was fine then as well); was just curious about what was going on 😅