Added a proguard file that should fix a crash on Android 4.2 for Samsung

Also reduces the size of the APK.
This commit is contained in:
Albert Vaca
2015-06-13 20:58:59 -07:00
parent d6264c3359
commit 017d05b189
2 changed files with 33 additions and 0 deletions

View File

@@ -40,6 +40,10 @@ android {
checkReleaseBuilds false
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
@@ -53,6 +57,7 @@ dependencies {
compile 'org.apache.sshd:sshd-core:0.8.0'
compile 'org.bouncycastle:bcprov-jdk16:1.46'
androidTestCompile 'org.mockito:mockito-core:1.10.19'
// Because mockito has some problems with dex environment

28
proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,28 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in {SDKHOME}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# 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 *;
#}
# Allow obfuscation of android.support.v7.internal.view.menu.**
# to avoid problem on Samsung 4.2.2 devices with appcompat v21
# see https://code.google.com/p/android/issues/detail?id=78377
-keep class !android.support.v7.internal.view.menu.**,** {*;}
-dontwarn org.apache.sshd.**
-dontwarn org.apache.mina.**
-dontwarn org.bouncycastle.**
-dontwarn org.slf4j.**