【发布时间】:2019-12-21 04:24:35
【问题描述】:
我已经建立了一个多模块的 gradle 项目,其中包含一个 common 模块和一个 ktor 模块。
通用模块是一个 kotlin 多平台库。
当我从 Intellij 运行它时,我希望能够提供从 ktor 服务器的公共库生成的 javascript 文件。
目前 ktor 设置为将资源作为静态内容提供服务:
static("/static") {
resources()
}
ktor模块对common模块有依赖:
dependencies {
compile project(':common')
...
}
我假设在 Intellij 中运行时能够浏览到 http://localhost:8080/static/common.js 以检索公共模块 JS 构建的输出(写入 common\build\classes\kotlin\js\main),但这不起作用。
【问题讨论】:
标签: gradle kotlin ktor kotlin-multiplatform