Hello. I have this setup ```js(IR) { moduleNa...
# javascript
a
Hello. I have this setup
Copy code
js(IR) {
    moduleName = "kmm-lib"
    nodejs {
        binaries.library()
    }
    useCommonJs()
    generateTypeScriptDefinitions()
}
but i'm getting
Unresolved reference: generateTypeScriptDefinitions
when compiling it. Why would that be ? 😞 Is there something else that also needs to be configured ?!
a
Hello 👋 It could be that the version of the plugin doesn't contain the configuration method. As far as I remember, the method was provided in 1.8.20, so, if you use the gradle plugin with lower version - the method doesn't exist.
Could you please check what the version of compiler and Kotlin gradle plugin you use?
a
I've switched to
Copy code
val kotlin_version by extra("1.9.0")
and
Copy code
kotlin("multiplatform") version "1.9.0" apply false
and
Copy code
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.0")
and
distributionUrl=https\:<//services.gradle.org/distributions/gradle-7.4.2-bin.zip>
🙁
should i perhaps increase 7.4.2 to something bigger ?
the thing is it offers autocomplete in Android Studio ... so it "has" it somewhere ... it's very strange. I'm sure i'm missing something, and olver version of ... something, but not sure what.
other ideas ? 😞
t
I have similar problem with
1.9.0
in custom plugins. Kotlin DSL doesn’t work fine with Kotlin extensions. With Kotlin
1.8.20
works fine. Gradle
8.2.0
a
@Ilya Goncharov [JB] ^^
a
Copy code
Updated Android Studio to the latest version
Copy code
Downgraded from 1.9.0 to 1.8.22
Copy code
classpath("com.android.tools.build:gradle:8.0.2")
Copy code
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
Still throws an error on
Copy code
generateTypeScriptDefinitions
😞 Any other ideas ?!
what in the world is happening ?!
but NOW ... it doesn't even see the method, it doesn't autocomplete it anymore ... o.O
i
Does it work just on simple project from wizard?
a
good question. i will check !
🙏 2
a
@Ilya Goncharov [JB] I’m facing the same issue with kotlin 19.21 @AndreiBogdan did you solve it ?
a
I didn't. No. We scrapped the web side of the project entirely 😄 But in case you do figure out, please remember to come back here and post your solution. I'm quite curious what it could have been ...