When using "org.jetbrains.kotlin.native" (version ...
# kotlin-native
t
When using "org.jetbrains.kotlin.native" (version
1.3.31
) with Gradle
5.4
- plugin fails to apply with following error:
Copy code
Caused by: java.lang.NoSuchMethodError: org.gradle.language.nativeplatform.internal.DefaultNativeComponent.<init>(Lorg/gradle/api/internal/file/FileOperations;)V
        at org.jetbrains.kotlin.gradle.plugin.experimental.internal.AbstractKotlinNativeComponent.<init>(AbstractKotlinNativeComponent.kt:58)
        at org.jetbrains.kotlin.gradle.plugin.experimental.internal.KotlinNativeMainComponent.<init>(KotlinNativeMainComponent.kt:46)
        at org.jetbrains.kotlin.gradle.plugin.experimental.internal.KotlinNativeMainComponent_Decorated.<init>(Unknown Source)
        at org.gradle.internal.instantiation.AsmBackedClassGenerator.newInstance(AsmBackedClassGenerator.java:153)
        at org.gradle.internal.instantiation.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:363)
        at org.gradle.internal.instantiation.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:48)
        ... 161 more
Also it is a little strange that plugin uses Gradle internal classes
i
Yes, it's a known issue. This plugin relies on the experimental Gradle native infrastructure so it has to use internal APIs. We also recommend using the
kotlin-multiplatform
plugin instead because it's more stable, has an IDE support and doesn't use Gradle native infrastructure. See details at https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html.
t
maybe then, in next release of the plugin drop support for old Gradle versions?
for this particular plugin
i
Probably we will be able to drop such a support. But firstly we need to double check that such a drop will not affect users of our libraries published with the old versions of Gradle metadata. Let me investigate it.
👍 1