Kermit icon indicating copy to clipboard operation
Kermit copied to clipboard

Gradle plugin not published for Kotlin 2.0

Open wardvl opened this issue 10 months ago • 4 comments

Currently the Gradle plugin does not support Kotlin version 2.0 as it has incompatible features. Could support for Kotlin 2.0 be added?

e: There are some plugins incompatible with language version 2.0:
  co.touchlab.kermit.irplugin.KermitComponentRegistrar
Please use language version 1.9 or below

wardvl avatar Mar 05 '25 12:03 wardvl

Release 2.0.5 uses Kotlin 2.0.21, you must be behind.

pm47 avatar Mar 06 '25 19:03 pm47

@pm47 The Kermit Gradle plugin (referring to co.touchlab:kermit-gradle-plugin) latest version is 1.2.3 in Maven. This issue is reproducible if you configure Kermit in build.gradle.kts of :app. To reproduce the issue, add import co.touchlab.kermit.gradle.StripSeverity to the Gradle file and do the following configuration for Kermit:

kermit {
    if (project.hasProperty("environment")) {
        if (project.property("environment") == "release") {
            stripBelow = StripSeverity.Error
        }
    }
}

This throws the exact error reported in this issue during compilation.

  • Kotlin version 2.1.0
  • AGP version 8.6.1

xhuliano98 avatar Mar 10 '25 12:03 xhuliano98

@pm47 The Kermit Gradle plugin (referring to co.touchlab:kermit-gradle-plugin) latest version is 1.2.3 in Maven. This issue is reproducible if you configure Kermit in build.gradle.kts of :app. To reproduce the issue, add import co.touchlab.kermit.gradle.StripSeverity to the Gradle file and do the following configuration for Kermit:

kermit {
    if (project.hasProperty("environment")) {
        if (project.property("environment") == "release") {
            stripBelow = StripSeverity.Error
        }
    }
}

This throws the exact error reported in this issue during compilation.

  • Kotlin version 2.1.0
  • AGP version 8.6.1

Idd, the issue only happens with the Gradle plugin. The runtime dependency is working just fine with Kotlin 2.0.

wardvl avatar Mar 11 '25 09:03 wardvl

We deprecated the plugins with the Kermit 2.0 release due lack of interest and the maintenance required to keep it up to date. The plugins would need to be updated to the latest Kotlin as well as to make sure it covers new Kermit api's correctly. If anyone is able to take this on, we aren't opposed to publishing an update

samhill303 avatar Mar 24 '25 16:03 samhill303