https://kotlinlang.org logo
#ktor
Title
# ktor
p

pajatopmr

03/06/2019, 8:59 AM
It would appear that
testWithApplication()
is JVM only. Is there an easy way to definitively verify that this is correct?
And it also appears that setting up a ktor server is not possible using Kotlin MPP. How can I verify that that is also true?
r

Robert Jaros

03/06/2019, 10:14 AM
p

pajatopmr

03/06/2019, 10:22 AM
As I dig deeper into mpp, it appears that the backend is for the jvm only and the front-end is for js only and the common code is trivial. That said, this at least is a better starting point in that it uses the multiplatform gradle plugin.
I think the proof positive case will have a Ktor server using the multiplatform gradle plugin with a native backend.
r

Robert Jaros

03/06/2019, 10:37 AM
Sharing code between the frontend (JS) and the backend (JVM) is one of the main use-cases of the MPP architecture.
The other is developing application targeting different platforms with one codebase.
You are probably thinking about this second scenario.
I've heard something about ktor-native, but havn't seen it.
r

r4zzz4k

03/06/2019, 11:21 AM
Yeah, ktor-server is JVM-only right now, unfortunately.