gregorbg
08/17/2020, 9:36 PMprojectRoot/frontend
(JS) and projectRoot/backend
(JVM) as individual modules and I'd like to migrate to Kotlin without changing the project structure too muchandylamax
08/17/2020, 11:09 PMprojectRoot/core
with it's gradle
file, in settings.gradle
add include(":core")
, then in projectRoot/frontend
and projectRoot/backend
add
dependencies {
implementation(project(":core"))
}
You'll be all setgregorbg
08/19/2020, 9:22 AMkotlin-multiplatform
template in IDEA gives me a project structure like this:
projectRoot
src
commonMain
commonTest
jvmMain
jvmTest
jsMain
jsTest
build.gradle.kts (defines kotlin("multiplatform") plugin)
What I want is something along those lines:
projectRoot
core
src
main
test
build.gradle.kts (defines the common part of the multiplatform plugin)
frontend
src
main
test
build.gradle.kts (defines the JS part of multiplatform, perhaps just using Kotlin/JS)
backend
src
main
test
build.gradle.kts (defines the JVM part of multiplatform, perhaps just using Kotlin/JVM)
build.gradle.kts (ties all the three subprojects together)
andylamax
08/19/2020, 9:33 AMprojectRoot
core
src
commonMain
commonTest
build.gradle.kts [kotlin("multiplatform")]
frontend
src
main
test
build.gradle.kts
kotlin("js")
dependencies {
implementation(project(":core"))
}
backend
src
main
test
build.gradle.kts
kotlin("jvm")
dependencies {
implementation(project(":core"))
}
build.gradle.kts
settings.gradle.kts
include(":core")
include(":frontend")
include(":backend")
gregorbg
08/19/2020, 1:34 PMandylamax
08/19/2020, 5:19 PM