https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
t

Tristan

06/22/2021, 12:55 PM
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

CLOVIS

06/22/2021, 1:00 PM
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

Tristan

06/22/2021, 1:06 PM
Thanks for your answer! So I cannot go deeper than one level.
c

CLOVIS

06/22/2021, 1:40 PM
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

Tristan

06/22/2021, 2:57 PM
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

CLOVIS

06/22/2021, 6:32 PM
Glad I could help ^^
33 Views