Hello, Is it possible to have a KMM project neste...
# multiplatform
t
Hello, Is it possible to have a KMM project nested in another one? Like create a KMM library, and the project includes a test app build with KMM as well.
c
Yes, you can create multiple-project builds with Gradle: https://docs.gradle.org/current/userguide/multi_project_builds.html#multi_project_builds Here's an example of one if you prefer to learn by example: https://gitlab.com/arcachon-ville/formulaide
t
Thanks for your answer! So I cannot go deeper than one level.
c
You definitely can, sorry if that wasn't precise. Here's another one that goes multiple levels down: https://gitlab.com/braindot/clovis (notice modules
:compose
,
:compose:client
, etc)
The only thing you need, is that they should all have a
build.gradle
, and there should be a single
settings.gradle
at the root
(also there are a few details, but you'll find those when you try: the Kotlin plugins must be declared in the root project)
t
Thank you so much for your guidance. I went a little deeper in the doc you gave me, and I think I found what I needed https://docs.gradle.org/current/userguide/structuring_software_products.html
c
Glad I could help ^^