kezong / fat-aar-android

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

Classes not exposed on release aar with minifyEnabled #376

Closed wishygupta closed 2 years ago

wishygupta commented 2 years ago

Describe the issue Classes not exposed on release aar with minifyNeabled set as true

Build Environment

I created a sample app with 2 library modules. The link is here Fat Arr Sample Enabled minify for both lib1 and lib2 modules. Also added proguard rules The final release aar doesn't contain the classes declared on proguard.

JOikarinen commented 2 years ago

I have noticed this same issue on my project.

wishygupta commented 2 years ago

This can be solved using proguard rules. Add your classes to be exposed in proguard of ur library module. Another way is to use annotation @Keep