Hello, everyone ! 👋
Quick question: when I create a Kotlin only module in an Android Project (
apply plugin: 'kotlin'
), do I have to setup anything for ProGuard/R8?
In other all modules, there is
minifyEnabled
set to
true
, but this setup is inside
android
tag.
Thanks a lot in advance! ❤️
😶 2
e
ephemient
04/23/2021, 5:20 PM
nothing to do with Kotlin - same applies to any module in an Android project
ephemient
04/23/2021, 5:22 PM
proguard only matters when packaging (e.g. app)
ephemient
04/23/2021, 5:22 PM
an Android library can export proguard files for the eventual app to merge (
consumerProguardFiles
) but it doesn't get any proguard applied on its own
e
escodro
04/23/2021, 5:24 PM
Thanks!
k
KD
04/23/2021, 9:44 PM
You dont have to import it, it's already there in android gradle plugin. New versions of AGP uses R8 instead of Proguard, which besides doing obfuscation, minification etc, also takes care of desugaring of new Java APIs.