https://kotlinlang.org logo
#kobweb
Title
# kobweb
f

Funyinoluwa Kashimawo

10/17/2023, 9:51 PM
Hi @David Herman is there a template that shows code shared between the jsMain jvmMain and an android module? I tried to extract the commonMain into a separate shared module but I am having compose runtime issues
d

David Herman

10/17/2023, 9:52 PM
Nothing Android from me. However! Stevdza-san released a video showcasing this very setup.

https://www.youtube.com/watch?v=cOtL_iGLBLI

is the high level course description
I believe their code is open source even if you don't pay for the course.
f

Funyinoluwa Kashimawo

10/18/2023, 1:50 PM
Yeah that is the course I am on. So he used a common module under the site directory to share the code within kobweb then created another common module above the site directory and use interfaces to share the code between the site and android
Something like this
But In my case I wanted a single shared module outside with the multiplatform expect and actual api to share with other platforms
Initially I was having compose runtime compatibility error for a long time, but I was able fix it by add this to the commonMain of the shared module and the jsMain and jvmMain of the site module
implementation(compose.runtime)
d

David Herman

10/18/2023, 9:24 PM
Ah, gotcha
So Gradle issue? Sounds like it's resolved?
f

Funyinoluwa Kashimawo

10/19/2023, 8:31 AM
Yeah It is resolved, thanks.