You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating from 0.25.3, the new reference to KotlinMultiplatformExtension causes my build to fail. The version bump PR is drewhamilton/Poko#28; my failed build is here with the relevant portion of the stacktrace pasted below:
Caused by: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/dsl/KotlinMultiplatformExtension
at com.vanniktech.maven.publish.KotlinMultiplatform.configure$plugin(Platform.kt:293)
at com.vanniktech.maven.publish.MavenPublishBaseExtension.configure(MavenPublishBaseExtension.kt:358)
at com.vanniktech.maven.publish.MavenPublishBaseExtension.configureBasedOnAppliedPlugins(MavenPublishBaseExtension.kt:375)
at com.vanniktech.maven.publish.MavenPublishBaseExtension.configureBasedOnAppliedPlugins$default(MavenPublishBaseExtension.kt:364)
at com.vanniktech.maven.publish.MavenPublishPlugin.apply$lambda$2(MavenPublishPlugin.kt:32)
at com.vanniktech.maven.publish.MavenPublishPlugin.apply$lambda$3(MavenPublishPlugin.kt:30)
at org.gradle.internal.code.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:124)
at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:173)
Best I can tell, this seems to stem from the following combination of things:
gradle-maven-publish-plugin has a compileOnly dependency on kotlin-gradle-plugin.
Poko's build-support module has an implementation dependency on kotlin-gradle-plugin-api.
KotlinMultiplatformExtension is defined in kotlin-gradle-plugin, not kotlin-gradle-plugin-api.
The following attempted fixes don't help:
Changing my build-support module's dependency to kotlin-gradle-plugin causes my main project to throw the following. I think that's because build-support must use Gradle's built-in Kotlin version instead of the version I define?
The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.
Adding a compileOnly dependency on kotlin-gradle-plugin to my build-support module doesn't change anything.
Any idea if this is fixable, or whether there's a way to work around this?
The text was updated successfully, but these errors were encountered:
Changing my build-support module's dependency to kotlin-gradle-plugin causes my main project to throw the following. I think that's because build-support must use Gradle's built-in Kotlin version instead of the version I define?
You can make this work by then removing the kotlin plugin definitions that have apply false from the root build file and in the modules that use the plugin apply them with id("org.jetbrains.kotlin.jvm")/id("org.jetbrains.kotlin.multiplatform"). That way Gradle will use the plugin that comes from the build-support classpath instead of trying to add them again.
I'll need to think whether we can do something on this side.
Huh, that feels weird but seems to work. I thought that would bring in the Gradle-bundled Kotlin version instead of the version I specified, but it doesn't.
Seems like this would fix the issue without requiring use of the non-API dependency.
When updating from 0.25.3, the new reference to
KotlinMultiplatformExtension
causes my build to fail. The version bump PR is drewhamilton/Poko#28; my failed build is here with the relevant portion of the stacktrace pasted below:Best I can tell, this seems to stem from the following combination of things:
compileOnly
dependency onkotlin-gradle-plugin
.build-support
module has animplementation
dependency onkotlin-gradle-plugin-api
.KotlinMultiplatformExtension
is defined inkotlin-gradle-plugin
, notkotlin-gradle-plugin-api
.The following attempted fixes don't help:
build-support
module's dependency tokotlin-gradle-plugin
causes my main project to throw the following. I think that's becausebuild-support
must use Gradle's built-in Kotlin version instead of the version I define?compileOnly
dependency on kotlin-gradle-plugin to mybuild-support
module doesn't change anything.Any idea if this is fixable, or whether there's a way to work around this?
The text was updated successfully, but these errors were encountered: