Closed piacenti closed 6 months ago
Not an easy one. Let me see if it's doable.
Ok! Seems like I got it. Easier than what I thought, although it introduces an additional complexity.
This problem seems weird to me. How is it possible that the JetBrains team did not consider this use case?
@ftomassetti the thing is it doesn't depend on the binaries we ship, but it depends on the code we generate.
The kotlin-jvm
plugin doesn't contain JS related definitions, that's why JsName
is not found. If you think about it from this perspective, it makes more sense.
@piacenti RC2 is out, so you can remove your workaround.
I know you just added JsName to solve for label variable name clashes. However, when not using a JS target the import for that is taken as an error. I'm not sure if there is an easy fix but for now I'm just running a gradle task to delete all JsName references for jvm only projects. My use case is needing to use an antlr grammar in gradle buildSrc to do some automation for the build process. Gradle buildSrc is generally just a jvm project.