ktor

Create fat jar from ktor Kotlin multiplatform project with Kotlin Gradle DSL

天大地大妈咪最大 提交于 2020-07-23 07:38:06
问题 Trying to create a runnable jar for a kotlin multiplatform project which includes a ktor server component, building with Kotlin Gradle DSL. I have seen several questions including Create fat jar from kotlin multiplatform project which asks and answers how to create the gradle build file in Groovy, but how do you do it in kotlin dsl? The groovy code that is reported to work is: kotlin { jvm() { withJava() jvmJar { manifest { attributes 'Main-Class': 'sample.MainKt' } from { configurations

Create fat jar from ktor Kotlin multiplatform project with Kotlin Gradle DSL

对着背影说爱祢 提交于 2020-07-23 07:37:16
问题 Trying to create a runnable jar for a kotlin multiplatform project which includes a ktor server component, building with Kotlin Gradle DSL. I have seen several questions including Create fat jar from kotlin multiplatform project which asks and answers how to create the gradle build file in Groovy, but how do you do it in kotlin dsl? The groovy code that is reported to work is: kotlin { jvm() { withJava() jvmJar { manifest { attributes 'Main-Class': 'sample.MainKt' } from { configurations

java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled

自作多情 提交于 2020-06-11 08:39:11
问题 When I run my Ktor application with gradle run then I've got the following exception: 19:21:11.795 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework 19:21:11.810 [main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false 19:21:11.810 [main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 11 19:21:11.811 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe:

java.lang.UnsupportedOperationException: Reflective setAccessible(true) disabled

大兔子大兔子 提交于 2020-06-11 08:39:09
问题 When I run my Ktor application with gradle run then I've got the following exception: 19:21:11.795 [main] DEBUG io.netty.util.internal.logging.InternalLoggerFactory - Using SLF4J as the default logging framework 19:21:11.810 [main] DEBUG io.netty.util.internal.PlatformDependent0 - -Dio.netty.noUnsafe: false 19:21:11.810 [main] DEBUG io.netty.util.internal.PlatformDependent0 - Java version: 11 19:21:11.811 [main] DEBUG io.netty.util.internal.PlatformDependent0 - sun.misc.Unsafe.theUnsafe:

How to Run Cron Jobs in Kotlin Ktor?

廉价感情. 提交于 2020-01-05 07:12:36
问题 Is there a way to run Cron Jobs with Ktor? My end objective is to host a Cron Job written with Kotlin for the Coinverse app's backend service to populate data. I'm currently hosting multiple Java .jar apps written in Kotlin on AppEngine. I'm looking to refactor these apps into Ktor apps on AppEngine with a Cron Job for scheduled tasks, as the .jar apps have more issues with dependencies. I'm looking for Ktor's equivalent to Cloud Functions' built-in implementation for Cron Jobs with

Ktor - Static content routing

不羁的心 提交于 2020-01-03 18:03:18
问题 I would love to understand better how Ktor is handling the routing for static content. I have the following hierarchy in my static folder (working directory): - static - index.html - (some files) - static - css (directory) - js (directory) - (some files) I'd like to serve all of them. So I was using directly this code in routing : static { defaultResource("index.html", "static") resources("static") } Which works very well, but the issue is that it's taking the hand on all requests including

Deploying With Ktor: How To Set AppEngine Version?

让人想犯罪 __ 提交于 2020-01-02 19:32:22
问题 Issue I've followed this clear and concise Ktor tutorial. Now that I have successfully deployed to AppEngine I would like to manually set the version of future deploys . Google's documentation of the appengine-web.xml file indicates the <version> tag can be utilized for this purpose, but also states that the <version> tag is unused for Cloud SDK based tooling . I attempted to set the tag and confirmed this value is not being used when deployed to AppEngine. Attempted Solutions Looked for way