kezong / fat-aar-android

A gradle plugin that merge dependencies into the final aar file works with AGP 3.+
MIT License
3.13k stars 618 forks source link

Kotlin Enum Obfuscation Missing Fields On 1.2.15 #155

Open zsweigart opened 4 years ago

zsweigart commented 4 years ago

When building a release version of an aar using proguard we see the following error for all of our enums:

Function invocation 'name()' expected

This error only occurs with the latest versions:

com.android.tools.build:gradle:4.0.0
com.kezong:fat-aar:1.2.15

If we revert back to

com.android.tools.build:gradle:3.6.3
com.kezong:fat-aar:1.2.12

The issue is resolved.

Our proguard contains the line:

-keepclassmembers enum * { public *; }

To keep our enums.

kezong commented 3 years ago

Keep AGP version, Try upgrade plugin to 1.3.1