Gradle不会发出kotlin.js [英] Gradle doesn't emit kotlin.js

查看:88
本文介绍了Gradle不会发出kotlin.js的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的Kotlin应用程序和Kotlin库集编译为JavaScript.我已经很好地工作了,但是当我尝试运行它时却找不到kotlin.js.

I'm trying to compile my Kotlin app and set of Kotlin libraries to JavaScript. I've got that working well, but when I try to run it it can't find kotlin.js.

那么这是怎么回事?当我使用IDEA(而不是Gradle)进行编译时,它的输出kotlin.js很好.我尝试使构建脚本更像我发现的示例,但无法编译 ...

So what's going on here? When I compile using IDEA (instead of Gradle), it outputs kotlin.js just fine. I tried making my build script more like an example I found, but that wouldn't compile...

以下是到相关代码和项目的链接:

Here's a link to the code and project in question: https://github.com/BlueHuskyStudios/Decision-Cruncher/blob/SO/q/53582651/1/build.gradle

推荐答案

对于其他将来遇到困难的人,我遇到了以下问题:

For any others struggling in the future, I've had the following issue:

已经在gradle文件中生成了IntelliJ Kotlin/JS入门项目:

IntelliJ Kotlin/JS starter project has been generated with this in the gradle file:

implementation "org.jetbrains.kotlin:kotlin-stdlib-js"

要获取kotlin.js文件,必须是

compile "org.jetbrains.kotlin:kotlin-stdlib-js"

这篇关于Gradle不会发出kotlin.js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆