在我的库中,我consumerProguardFiles
在发布构建类型中使用。我的proguard角色是:
-obfuscationdictionary proguard-dictionary.txt
-classobfuscationdictionary proguard-dictionary.txt
-packageobfuscationdictionary proguard-dictionary.txt
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontpreverify
-verbose
-dump class_files.txt
-printseeds seeds.txt
-printusage unused.txt
-printmapping mapping.txt
-optimizations !code/simplification/arithmetic,!field/removal/writeonly,!field/marking/private,!class/merging/*,!code/allocation/variable
-flattenpackagehierarchy
-allowaccessmodification
-renamesourcefileattribute SourceFile
-keepattributes *Annotation*
-keepattributes Signature,MethodParameters,LocalVariableTable,LocalVariableTypeTable
-keepattributes SourceFile,LineNumberTable
-keepattributes Exceptions,InnerClasses
当开发人员在项目中使用我的库(AAR)并获取 release build 和 use时,找不到minifyEnabled true
get :proguard-dictionary.txt
AGPBI: {"kind":"error","text":"File not found: /Users/USER/.gradle/caches/transforms-2/files-2.1/12e928515abf78e8a4387fd92c3a399b/proguard-dictionary.txt","sources":[{"file":"/Users/USER
/.gradle/caches/transforms-2/files-2.1/12e928515abf78e8a4387fd92c3a399b/proguard-dictionary.txt"}],"tool":"D8"}
AGPBI: {"kind":"error","text":"File not found: /Users/USER
/.gradle/caches/transforms-2/files-2.1/12e928515abf78e8a4387fd92c3a399b/proguard-dictionary.txt","sources":[{"file":"/Users/USER
/.gradle/caches/transforms-2/files-2.1/12e928515abf78e8a4387fd92c3a399b/proguard-dictionary.txt"}],"tool":"D8"}
AGPBI: {"kind":"error","text":"File not found: /Users/USER
/.gradle/caches/transforms-2/files-2.1/12e928515abf78e8a4387fd92c3a399b/proguard-dictionary.txt","sources":[{"file":"/Users/USER
/.gradle/caches/transforms-2/files-2.1/12e928515abf78e8a4387fd92c3a399b/proguard-dictionary.txt"}],"tool":"D8"}
如何在-obfuscationdictionary
不使用字典文件的情况下使用?或者我该如何解决这个问题?