Skip to content

Improve Kotlin binary compatibility #1237

@igorwojda

Description

@igorwojda

I am trying to use 13.0.0-rc01 with build-logic module storing convention plugins (used to encapsulate build logic and share module configuration across project).

The 12.2.4 works just fine, but when changing version to 13.0.0-rc01 gradle fails:

e: file:///Users/igorwojda/.gradle/caches/modules-2/files-2.1/com.mikepenz.aboutlibraries.plugin/aboutlibraries-plugin/13.0.0-rc01/975baa51ecdc2852925012899b39583b1993695f/aboutlibraries-plugin-13.0.0-rc01.jar!/META-INF/plugin.kotlin_module Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 2.2.0, expected version is 2.0.0.

BTW The 13.0.0-rc01 also works when plugin is applied directly to the app module

Simple fix may be to set apiVersion and languageVersion:

kotlin {
    compilerOptions {
        apiVersion.set(KotlinVersion.KOTLIN_1_8)
        languageVersion.set(KotlinVersion.KOTLIN_1_8)
    }
}

Issue can be reproduced in android-showcase project - just update AboutLibraries version to 13.0.0-rc01 in gradle/libs.versions.toml and run Sync Project With Gradle Files action in Android Studio

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions