I have an existing KMM shared module in my Android app I'm trying to add locally to test in another JVM/JS KMP project. In my settings.gradle.kts I added:
include(":shared")
project(":shared").projectDir = File("../path-to-android-project/shared")
And added
implementation(project(":shared"))
to the commonMain dependencies.
But I'm getting weird behavior now. The project UI on the left shows two copies of the project, one as a "module" (single blue square icon) appears as before
without the shared module beneath. But a second "module group" (4 blue squares icon) appears as well
with the shared module beneath.
When I attempt to build the project, I get the error:
Could not resolve project :shared.
Required by:
project :app
How can I successfully add a module like this to the project?