leakcanary
leakcanary copied to clipboard
Cannot upgrade Android Gradle Plugin to 7.3.1 with newest Leak Canary 2.10
Description
After upgrading Android Gradle Plugin to 7.3.1 I receive following build error:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':app' -> com.squareup.leakcanary:leakcanary-deobfuscation-gradle-plugin:2.10 -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.21
Steps to Reproduce
- Upgrade Android Gradle Plugin to 7.3.1
- Build app
- Error from description appears.
Expected behavior: Application compiles with no error.
Version Information
- LeakCanary version: 2.10
- Android OS version: n/a
- Gradle version: 7.3.1
The original contributor is @mzgreen, and @Goooler made a few changes over time. I mostly haven't touched this plugin so not a great person to fix. You're also welcome to contribute a fix.
This is a warning, build passed. Might be time to upgrade Kotlin version of LC.
Definitely plan on bumping but for LeakCanary 3, I've been sticking to the same version of Kotlin for all of LeakCanary 2.x
but you're saying "Kotlin Gradle plugin version 1.5.20" implies "kotlin compiler 1.5" ?
That's a check from AGP.
This is a warning, build passed. Might be time to upgrade Kotlin version of LC.
No it is an error in my project and it unabled to compile the app.
but you're saying "Kotlin Gradle plugin version 1.5.20" implies "kotlin compiler 1.5" ?
I mean this: https://plugins.gradle.org/plugin/org.jetbrains.kotlin.android. Currently you are using version 1.4.21 from December 2020. It is defined in line 18 in file "gradle/libs.versions.toml" (https://github.com/square/leakcanary/commit/51cdeca4e98b4c29e1e631209d8432bdd298316d#)
Do you apply the newer KGP in you classpath? It works well in my project with KGP 1.8.0 & AGP 7.4.0, see https://github.com/Goooler/DemoApp
Will upgrade a bunch of things for 3.0 so this will hopefully go away.