https://kotlinlang.org logo
#compose
Title
# compose
c

Colton Idle

12/11/2020, 1:17 AM
I feel like this was asked before and someone posted a link to a blog post, but I'm searching through slack with no luck so far. My question: I want to use compose in my app, but I think moving all of my composables to a separate module will have a bunch of benefits. Is there a good tutorial for how to go about this? My main issue I think is the fact that I've never worked in a multi module project and so I'm definitely a bit intimidated. Also, composable re-use for desktop seems to make sense if we go this way.
j

Javier

12/11/2020, 1:19 AM
With IntelliJ IDEA you can create a Multiplatform compose project which will have a common module with composables so you can check the modules structure and Gradle configurations.
j

jim

12/11/2020, 5:29 PM
I assume you've already seen these, but just in case (or for those following along at home)... The multiplatform reference materials (https://kotlinlang.org/docs/reference/mpp-create-lib.html) actually read like a step-by-step tutorial if you keep clicking the next links at the bottom of each page. I've also found this to be a good brief overview: https://kotlinlang.org/docs/tutorials/mpp/multiplatform-library.html And of course there is the image viewer sample which is a compose-specific MPP (although not separate library): https://github.com/JetBrains/compose-jb/tree/master/examples/imageviewer
❤️ 1