can i have one gradle project that contains my ser...
# ktor
c
can i have one gradle project that contains my server side code using ktor, and also the code for my web frontend, using the kotlin-frontend-plugin?
d
https://github.com/Kotlin/kotlin-frontend-plugin/tree/master/examples/full-stack-example <-- this official sample is outdated, but does exactly that AFAIK
c
yes but in separate sub projects. which probably makes sense.
d
Yeah, you need to have several modules. One single module only can target to one platform: either JVM, JS or COMMON. And for any common module you will need as many modules as platforms are you targeting with an
expectedBy
in the buildscript referencing the common module. If you don’t plan to share code, you will still need one module for the backend in JVM, and other for the frontend in JS.