1.1.50 JS compiler requires kotlin-reflect?

After updating kotlin to 1.1.50 js compiler suddenly fails with this (truncated) stacktrace

Caused by: java.lang.NoSuchMethodError: kotlin.reflect.jvm.internal.KClassImpl.getData()Lkotlin/reflect/jvm/internal/ReflectProperties$LazyVal;
        at kotlin.reflect.full.KClasses.getMemberProperties(KClasses.kt:149)
        at org.jetbrains.kotlin.compilerRunner.ArgumentUtils.convertArgumentsToStringList(ArgumentUtils.java:59)
        at org.jetbrains.kotlin.compilerRunner.ArgumentUtils.convertArgumentsToStringList(ArgumentUtils.java:47)
        at org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile.callCompiler$kotlin_gradle_plugin(Tasks.kt:455)

Is it a bug or new feature?

1 Like

Yes, the compiler itself uses kotlin-reflect. How do you run the compiler? From command line, gradle or anything else?

Looks like the reason was old gradle version. 3.2.1.
Updating to 3.5 or 4.2 seems to fix error.

2 Likes