Zak*_*rdi 2 obfuscation android proguard android-r8
假设我有 3 个子项目(模块):
:libraryA
:libraryB
:app
Run Code Online (Sandbox Code Playgroud)
:app取决于:libraryA和:libraryB。在我的图书馆中,我有:
// libraryA
com.example.libraryA.Class1
// libraryB
com.example.libraryB.Class2
Run Code Online (Sandbox Code Playgroud)
当我在这两个库上运行 R8(如 proguard)时,它们会生成以下类:
// libraryA - Class1
a.a.a.a
// libraryB - Class2
a.a.a.a
(note that 2 different classes end up having the same signature)
Run Code Online (Sandbox Code Playgroud)
当我构建:app使用混淆的和 的.aar变体时,出现以下构建失败::libraryA:libraryB
Caused by: com.android.tools.r8.utils.b: Type a.a.a.a is defined multiple times:
Run Code Online (Sandbox Code Playgroud)
-keeppackagenames一种解决方案是在我的库的混淆器规则中使用
-keeppackagenames com.example.**
Run Code Online (Sandbox Code Playgroud)
但我想真正混淆包名称。我在这里有什么选择?
是否可以以唯一但确定的方式混淆包名称?例如,我希望发生以下情况:
com.example.libraryA->a.a.acom.example.libraryB->a.a.b这将避免任何潜在的冲突。这样的事情可以实现吗?
| 归档时间: |
|
| 查看次数: |
1055 次 |
| 最近记录: |