diff --git a/Habitica/build.gradle b/Habitica/build.gradle index 94f743cab..09897ad72 100644 --- a/Habitica/build.gradle +++ b/Habitica/build.gradle @@ -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 diff --git a/Habitica/proguard-project.txt b/Habitica/proguard-project.txt deleted file mode 100644 index f2fe1559a..000000000 --- a/Habitica/proguard-project.txt +++ /dev/null @@ -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 *; -#} diff --git a/Habitica/proguard-rules.pro b/Habitica/proguard-rules.pro new file mode 100644 index 000000000..69d06e55e --- /dev/null +++ b/Habitica/proguard-rules.pro @@ -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.* ; +} + +#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 ; +} +-keep enum org.greenrobot.eventbus.ThreadMode { *; } + +# Only required if you use AsyncExecutor +-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent { + (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 + diff --git a/Habitica/res/layout/activity_full_profile.xml b/Habitica/res/layout/activity_full_profile.xml index 0f16b897a..3ffe67ccd 100644 --- a/Habitica/res/layout/activity_full_profile.xml +++ b/Habitica/res/layout/activity_full_profile.xml @@ -185,7 +185,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="gone" - android:onClick="" android:id="@+id/copy_userid" />