android 新一代混淆技术

2019-01-31  本文已影响0人  fan_xing

之前都是用Proguard进行代码混淆压缩,从android studio 3.3开始,提供R8配合Proguard规则进行混淆,

For a given build type, when setting useProguard false, 
the plugin now uses R8 instead of ProGuard to shrink and 
obfuscate your app’s code and resources.

具体用法为在gradle.properties文件添加如下配置

android.enableR8=true

如果想体验完全的R8压缩,使用如下配置

android.enableR8.fullMode=true

官方也声明在不久的将来会用R8作为默认的混淆工具

参考链接: https://android-developers.googleblog.com/2018/11/r8-new-code-shrinker-from-google-is.html

上一篇 下一篇

猜你喜欢

热点阅读