https://kotlinlang.org logo
#getting-started
Title
# getting-started
d

Donny

10/24/2023, 3:49 PM
Upgrading to 1.9.20-RC and I get the following error when trying to build with gradle: Unable to find method ''java.util.List org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJsCompilation.getRelatedConfigurationNames()'' 'java.util.List org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJsCompilation.getRelatedConfigurationNames()' Works fine if I go down to 1.9.10
k

Klitos Kyriacou

10/24/2023, 4:45 PM
What version of Gradle are you running? Check compatibility at https://docs.gradle.org/current/userguide/compatibility.html
d

Donny

10/24/2023, 4:59 PM
8.1.1 which works fine for 1.9.10 . Do I need to upgrade to 8.4? Which would mean I need Java 21?
h

hho

10/24/2023, 5:11 PM
You don't need Java 21 for Gradle 8.4, it's the other way around: you need Gradle 8.4 for Java 21. It might be a bug in the Kotlin Multiplatform Gradle plugin; there's a new RC2 out now.
d

Donny

10/24/2023, 5:12 PM
I tried RC2 as well, and it didn't work.
😞 1
But is the idea that I need at least Gradle 8.4 for Kotlin 1.9.10 + ?
Because 8.1.1 worked fine for 1.9.10 but 8.1.1 nor 8.4 worked for 1.9.20-*
h

hho

10/24/2023, 5:19 PM
I don't think so. Only if you want to use Kotlin Gradle DSL with 1.9.x stuff – not to just compile Kotlin code.
d

Donny

10/24/2023, 5:20 PM
Ok. So it looks like it's a bug of some kind.
h

hho

10/24/2023, 5:20 PM
I just tried an admittedly simple project and could compile with Kotlin 1.9.20-RC2 and Gradle 8.1.1
d

Donny

10/24/2023, 5:20 PM
Hmm...
k

Klitos Kyriacou

10/24/2023, 5:21 PM
You could try using the upcoming Gradle 8.5 (which I guess might be released next month) at https://gradle.org/nightly/
d

Donny

10/24/2023, 5:30 PM
Just tried. No luck. Same issue. Shame. I've been waiting for a bugfix in 1.9.20 for many moons.
k

Klitos Kyriacou

10/24/2023, 5:30 PM
Are you using the latest version of the plugin, not just the dependency?
Copy code
plugins {
  kotlin("multiplatform") version "1.9.20-RC2"
}
d

Donny

10/24/2023, 5:31 PM
Yes.
It's just weird that everything works like clockwork if I revert to Kotlin 1.9.10
Looks like it's a particular plugin I'm using that's barfing. Removing it for now seems to alleviate the problem. I'll have to figure out why it's happening at some point.
15 Views