Reputation: 2144
After updating my Android app from Kotlin 1.5.21 to Kotlin 1.6.0, my proguard rules stopped working (i.e. they are ignored). This caused some reflection code to break on release mode. Downgrading to Kotlin 1.5.21 fixes the problem.
Are there any known problems with Kotlin 1.6.0 and proguard ?
Googling around, I see that there are other related problems (see this, this, this).
Upvotes: 5
Views: 1351
Reputation: 2144
The problem was the version of R8 bundled with the Android Gradle Plugin (AGP).
Following the advice in this related answer, I explicitly set com.android.tools:r8:3.0.77
in my gradle configuration file.
dependencies {
classpath("com.android.tools:r8:3.0.77")
classpath 'com.android.tools.build:gradle:7.1.0'
}
Upvotes: 1