Is it possible to develop a KMM library and app in...
# multiplatform
h
Is it possible to develop a KMM library and app in tandem? I mean is there a workflow where I can make changes to the library, make corresponding changes to the app, and build & run to test? Or must I first publish my library changes (to MavenLocal for example), update dependencies in my app, make my app changes, and only then can I build and test?
d
You're probably looking for Gradle Composite builds; this feature of Gradle enables you to loosely couple separate Library and App projects with 'dependency substitution'.
The bad news is, this is not yet supported with Kotlin Multiplatform.
The good news is, support is implemented and due for Kotlin
1.8.20-Beta
. Merry K hristmas!
h
Thanks for the info @darkmoon_uk. Looking forward to the upcoming changes.
b
Why not just use regular gradle modules in a monorepo instead?
h
Thanks @Big Chungus. Do you know of an example of this type of project setup? Specifically, I'm building a KMM (iOS and Android) library that will be published internally for use in apps in our organization, and I'd like to include with it a sample app that links directly to the library (no publishing required) for faster iteration while developing the library.
b
Nothing special about it. Just regular gradle modules with project() dependencies