Skip to content

Commit

Permalink
Updated ProGuard rules
Browse files Browse the repository at this point in the history
  • Loading branch information
magneticflux- committed Oct 31, 2017
1 parent 47aae2c commit 2eb1e09
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
defaultConfig {
minSdkVersion 19
targetSdkVersion 19
versionCode 1
versionName "3.4"
versionCode 2
versionName "3.4.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

ndk {
Expand Down
40 changes: 37 additions & 3 deletions library/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,41 @@
# hide the original source file name.
#-renamesourcefileattribute SourceFile

#Keep all Vuforia data
-keep,includedescriptorclasses class com.vuforia.** {
#Keep all Qualcomm RobotCore data
-keep,includedescriptorclasses class com.qualcomm.robotcore.** {
*;
}
}
#Keep all FIRST RobotCore data
-keep,includedescriptorclasses class org.firstinspires.ftc.robotcore.** {
*;
}
#Keep all HTTPD data
-keep,includedescriptorclasses class org.firstinspires.ftc.robotcore.** {
*;
}

-dontwarn com.sun.tools.**
-dontwarn com.google.common.**

##---------------Begin: proguard configuration for Gson ----------
# 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
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }

# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { *; }

# Prevent proguard from stripping interface information from TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

##---------------End: proguard configuration for Gson ----------

0 comments on commit 2eb1e09

Please sign in to comment.