Enable Proguard for only two packages in large Android application

后端 未结 1 458
终归单人心
终归单人心 2021-01-20 19:18

Background

I am developing an Android application that relies on multiple external libraries (8 added as library project dependencies, 14 added as j

相关标签:
1条回答
  • 2021-01-20 20:10

    The correct syntax is a comma-separated list without any parentheses:

    -keep class !com.google.zxing.**,!com.example.app.** { *; }
    

    See the ProGuard manual > Usage > Filters.

    Note that this single line already implies the two other lines for interfaces and enums. You can imply the -keep options for all subpackages by not letting the last wildcard match subpackages:

    -keep class !com.google.zxing.**,!com.example.app.* { *; }
    
    0 讨论(0)
提交回复
热议问题