I have an existing KMM shared module in my Android...
# gradle
j
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:
Copy code
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?
message has been deleted
v
You cannot use
include
properly for a setup like that. If you want to combine builds, use composite builds. If it does not work (I was told there are problems with KMM), then you probably have to resort to deploying to a local repository manually and using from there.