Reputation: 183
When compiling using the kotlin 1.8 sdk, for example :
kotlinc-js -version
One gets the following:
info: kotlinc-js 1.8.0 (JRE 19.0.1)
error: ==========
This project currently uses the Kotlin/JS Legacy compiler backend, which has been deprecated and will be removed in a future release.
Please migrate your project to the new IR-based compiler (https://kotl.in/jsir).
Because your build tool will not support the new Kotlin/JS compiler, you will also need to migrate to Gradle.
You can continue to use the deprecated legacy compiler in the current version of the toolchain by providing the compiler option -Xuse-deprecated-legacy-compiler.
==========
The implication of this seems to be that the IR js compiler can be used from Gradle - which seems a really annoying limitation. Is this really this case?
Upvotes: 1
Views: 255
Reputation: 126
For the 1.8.0 version you have two options:
-Xir-produce-js
flag.-Xuse-deprecated-legacy-compiler
.Upvotes: 0