Skip to content

Fix link plugins failing on Kotlin 2.4 projects - #106

Merged
wellingtoncosta merged 1 commit into
mainfrom
wp/kotlin-2-4-support
Oct 14, 2026
Merged

wellingtoncosta merged 1 commit into
mainfrom
wp/kotlin-2-4-support

Conversation

@wellingtoncosta

Copy link
Copy Markdown
Contributor

Summary

Projects using co.touchlab.crashkios.crashlyticslink or co.touchlab.crashkios.bugsnaglink fail during Gradle configuration with Kotlin 2.4.x:

java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/targets/native/tasks/artifact/KotlinArtifactsExtensionKt
    at co.touchlab.crashkios.CrashlyticsLinkPlugin$apply$1$1.execute(CrashlyticsLinkPlugin.kt:35)

Kotlin 2.4 removed the experimental kotlinArtifacts DSL, which was deprecated in Kotlin 2.2 and became an error in 2.3. Both plugins still accessed project.kotlinArtifactsExtension inside afterEvaluate, causing configuration to fail because the API no longer exists.

Fix

Removed the kotlinArtifacts handling (crashLinkerConfigArtifacts) from both plugins.

The project's Kotlin version remains unchanged to preserve compatibility with older Kotlin 2.x versions.

@ignacio-touchlab ignacio-touchlab left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to reproduce the error on a sample project with kotlin 2.4 and after applying the fix it works. LGTM!

@wellingtoncosta
wellingtoncosta merged commit e9e9384 into main Oct 14, 2026
2 of 3 checks passed
@wellingtoncosta
wellingtoncosta deleted the wp/kotlin-2-4-support branch October 14, 2026 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants