mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-05-19 20:29:02 +00:00
add proguard rules
This commit is contained in:
parent
bdf31cfac9
commit
45cd93d40a
4 changed files with 104 additions and 28 deletions
|
|
@ -113,9 +113,7 @@ dependencies {
|
|||
compile('com.facebook.android:facebook-android-sdk:4.11.0') {
|
||||
transitive = true
|
||||
}
|
||||
|
||||
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1@aar'
|
||||
|
||||
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1@aar'
|
||||
//RxJava
|
||||
compile 'io.reactivex:rxandroid:1.2.1'
|
||||
compile 'io.reactivex:rxjava:1.2.0'
|
||||
|
|
@ -170,7 +168,8 @@ android {
|
|||
applicationIdSuffix ".debug"
|
||||
debuggable true
|
||||
multiDexEnabled true
|
||||
// Disable fabric build ID generation for debug builds
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
ext.enableCrashlytics = false
|
||||
resValue "string", "content_provider", "com.habitrpg.android.habitica.debug.fileprovider"
|
||||
resValue "string", "app_name", "Habitica Debug"
|
||||
|
|
@ -178,8 +177,9 @@ android {
|
|||
release {
|
||||
signingConfig signingConfigs.release
|
||||
debuggable false
|
||||
multiDexEnabled true
|
||||
|
||||
multiDexEnabled false
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
resValue "string", "content_provider", "com.habitrpg.android.habitica.fileprovider"
|
||||
resValue "string", "app_name", "Habitica"
|
||||
}
|
||||
|
|
@ -208,7 +208,7 @@ android {
|
|||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
|
||||
dexOptions {
|
||||
preDexLibraries false
|
||||
javaMaxHeapSize "4g" // Use gig increments depending on needs
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
97
Habitica/proguard-rules.pro
vendored
Normal file
97
Habitica/proguard-rules.pro
vendored
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# To enable ProGuard in your project, edit project.properties
|
||||
# to define the proguard.config property as described in that file.
|
||||
#
|
||||
# Add project specific ProGuard rules here.
|
||||
# By default, the flags in this file are appended to flags specified
|
||||
# in ${sdk.dir}/tools/proguard/proguard-android.txt
|
||||
# You can edit the include path and order by changing the ProGuard
|
||||
# include property in project.properties.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# Add any project specific keep options here:
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
-keepattributes Signature
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Exceptions
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
|
||||
#retrolambda
|
||||
-dontwarn java.lang.invoke.*
|
||||
-dontwarn sun.misc.**
|
||||
|
||||
#rxJava
|
||||
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
|
||||
long producerIndex;
|
||||
long consumerIndex;
|
||||
}
|
||||
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode producerNode;
|
||||
}
|
||||
|
||||
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
|
||||
rx.internal.util.atomic.LinkedQueueNode consumerNode;
|
||||
}
|
||||
|
||||
#OkHttp
|
||||
-keep class okhttp3.** { *; }
|
||||
-keep,includedescriptorclasses class okio.Source
|
||||
-keep,includedescriptorclasses class okio.okio.Buffer
|
||||
-keep interface okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
|
||||
|
||||
#retrofit
|
||||
-dontwarn retrofit2.**
|
||||
-keep class retrofit2.** { *; }
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
@retrofit2.http.* <methods>;
|
||||
}
|
||||
|
||||
#dbFlow
|
||||
-keep class * extends com.raizlabs.android.dbflow.config.DatabaseHolder { *; }
|
||||
-keep class * extends com.raizlabs.android.dbflow.config.BaseDatabaseDefinition { *; }
|
||||
-keep class com.raizlabs.android.dbflow.** {*;}
|
||||
|
||||
#gson
|
||||
# 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
|
||||
|
||||
#keep models
|
||||
-keep class com.magicmicky.habitrpgwrapper.lib.models.** { *; }
|
||||
|
||||
#eventbus
|
||||
-keepclassmembers class ** {
|
||||
@org.greenrobot.eventbus.Subscribe <methods>;
|
||||
}
|
||||
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
|
||||
|
||||
# Only required if you use AsyncExecutor
|
||||
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
|
||||
<init>(java.lang.Throwable);
|
||||
}
|
||||
|
||||
#crashlytic
|
||||
-keepattributes SourceFile,LineNumberTable
|
||||
-keep public class * extends java.lang.Exception
|
||||
-keep class com.crashlytics.** { *; }
|
||||
-dontwarn com.crashlytics.**
|
||||
|
||||
#add warnings here, warnings in proguard is normal
|
||||
-dontwarn javax.annotation.**
|
||||
-dontwarn com.squareup.picasso.**
|
||||
-dontwarn okio.**
|
||||
-dontwarn rx.**
|
||||
#-ignorewarnings
|
||||
|
||||
|
|
@ -185,7 +185,6 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:onClick=""
|
||||
android:id="@+id/copy_userid" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
|
|
|||
Loading…
Reference in a new issue