proguard

exclude packages from proguard

為{幸葍}努か 提交于 2021-02-07 13:22:50
问题 How can I inlcude some of the packages after I excluded the parent package in proguard.cfg: Ex: -keep com.myapp.** { *; } I want proguard to obfuscate com.myapp.data.** { *; } 回答1: You can use ProGuard-style regular expressions for the class name: -keep class !com.myapp.data.**,com.myapp.** { *; } 来源: https://stackoverflow.com/questions/18537003/exclude-packages-from-proguard

How to obfuscate API KEYS in AndroidManifest Android

谁说我不能喝 提交于 2021-02-07 10:54:59
问题 I discovered ProGuard and I managed to get my code obfuscated. It works. Amazing tool. But what ProGuard didn't obfuscate is the AndroidManifest.xml . I have a Google Maps API Key in my Manifest. I "secured" this API KEY in Google Developer Console using my package name and SHA-1 fingerprint. Is it recommended to obfuscate the api key in Manifest anyway? If so, how can I achieve this with ProGuard ? 回答1: Put your google key into .xml file. Never place restricts strings into AndroidManifest

How to obfuscate API KEYS in AndroidManifest Android

ⅰ亾dé卋堺 提交于 2021-02-07 10:54:31
问题 I discovered ProGuard and I managed to get my code obfuscated. It works. Amazing tool. But what ProGuard didn't obfuscate is the AndroidManifest.xml . I have a Google Maps API Key in my Manifest. I "secured" this API KEY in Google Developer Console using my package name and SHA-1 fingerprint. Is it recommended to obfuscate the api key in Manifest anyway? If so, how can I achieve this with ProGuard ? 回答1: Put your google key into .xml file. Never place restricts strings into AndroidManifest

Android crash while using GSON Library and ProGuard

可紊 提交于 2021-02-07 09:44:35
问题 I am using the following Proguard configuration with GSON library: # Gson uses generic type information stored in a class file when working with fields. Proguard # removes such information by default, so configure it to keep all of it. -keepattributes Signature # For using GSON @Expose annotation -keepattributes *Annotation* # Gson specific classes -keep class sun.misc.Unsafe { *; } #-keep class com.google.gson.stream.** { *; } # Application classes that will be serialized/deserialized over

Android crash while using GSON Library and ProGuard

妖精的绣舞 提交于 2021-02-07 09:43:29
问题 I am using the following Proguard configuration with GSON library: # Gson uses generic type information stored in a class file when working with fields. Proguard # removes such information by default, so configure it to keep all of it. -keepattributes Signature # For using GSON @Expose annotation -keepattributes *Annotation* # Gson specific classes -keep class sun.misc.Unsafe { *; } #-keep class com.google.gson.stream.** { *; } # Application classes that will be serialized/deserialized over

Android crash while using GSON Library and ProGuard

家住魔仙堡 提交于 2021-02-07 09:43:13
问题 I am using the following Proguard configuration with GSON library: # Gson uses generic type information stored in a class file when working with fields. Proguard # removes such information by default, so configure it to keep all of it. -keepattributes Signature # For using GSON @Expose annotation -keepattributes *Annotation* # Gson specific classes -keep class sun.misc.Unsafe { *; } #-keep class com.google.gson.stream.** { *; } # Application classes that will be serialized/deserialized over

Android Library: Release .aar getting classes.jar empty when using proguard

好久不见. 提交于 2021-02-07 02:36:01
问题 I'm trying to generate a library with minifyEnabled true but, inside the release .aar, classes.jar is getting empty. I have checked my proguard-rules.pro and it seems to be all right. I've even created a new module with the default .gradle files and when i set minifyEnable true the release version still gets the classes.jar with no class inside. After all, is it possible to generate an android library obfuscating the code? EDIT 1: Adding module build.gradle apply plugin: 'com.android.library'

Android Library: Release .aar getting classes.jar empty when using proguard

妖精的绣舞 提交于 2021-02-07 02:33:17
问题 I'm trying to generate a library with minifyEnabled true but, inside the release .aar, classes.jar is getting empty. I have checked my proguard-rules.pro and it seems to be all right. I've even created a new module with the default .gradle files and when i set minifyEnable true the release version still gets the classes.jar with no class inside. After all, is it possible to generate an android library obfuscating the code? EDIT 1: Adding module build.gradle apply plugin: 'com.android.library'

Android Library: Release .aar getting classes.jar empty when using proguard

♀尐吖头ヾ 提交于 2021-02-07 02:33:16
问题 I'm trying to generate a library with minifyEnabled true but, inside the release .aar, classes.jar is getting empty. I have checked my proguard-rules.pro and it seems to be all right. I've even created a new module with the default .gradle files and when i set minifyEnable true the release version still gets the classes.jar with no class inside. After all, is it possible to generate an android library obfuscating the code? EDIT 1: Adding module build.gradle apply plugin: 'com.android.library'

Android Library: Release .aar getting classes.jar empty when using proguard

|▌冷眼眸甩不掉的悲伤 提交于 2021-02-07 02:32:48
问题 I'm trying to generate a library with minifyEnabled true but, inside the release .aar, classes.jar is getting empty. I have checked my proguard-rules.pro and it seems to be all right. I've even created a new module with the default .gradle files and when i set minifyEnable true the release version still gets the classes.jar with no class inside. After all, is it possible to generate an android library obfuscating the code? EDIT 1: Adding module build.gradle apply plugin: 'com.android.library'