I'm developing an application that runs on multipl...
# multiplatform
z
I'm developing an application that runs on multiple targets. Is it better to have the common code as its own project and then separate projects for each target: android, ios, jvm, etc. Or would it be better to have it contained under a single project?
j
Such a thing is entirely subjective
h
If you want to use the Java Gradle plugins like application, you should move the JVM app target into its own project because 2.0.20 will emit a warning if you apply JVM targets with KMP. Also, Android application and JVM application plugin does not work in same KMP project. Personally, I would also create a common module (aka library) and a target module for each platform, mostly because of Gradle/KMP support.
1
c
Do you mean "project" as in "Gradle project" (= an IntelliJ module) or "project" as in "Git repositories" ? If it's the former, I agree with the previous answers. If it's the latter, I definitely recommend a single repository.