From 3c0f82970c07d11687501196c21ab68337eab34c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Sun, 10 May 2015 04:58:44 +0200 Subject: [PATCH] Workaround for Samsung Android 4.2 bug --- OpenKeychain/build.gradle | 7 +++++++ OpenKeychain/proguard-rules.pro | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 OpenKeychain/proguard-rules.pro diff --git a/OpenKeychain/build.gradle b/OpenKeychain/build.gradle index 9ea637b62..a4caa1fe7 100644 --- a/OpenKeychain/build.gradle +++ b/OpenKeychain/build.gradle @@ -106,6 +106,13 @@ android { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } + + buildTypes { + release { + minifyEnabled true + proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + } + } /* * To sign release build, create file gradle.properties in ~/.gradle/ with this content: diff --git a/OpenKeychain/proguard-rules.pro b/OpenKeychain/proguard-rules.pro new file mode 100644 index 000000000..38259dada --- /dev/null +++ b/OpenKeychain/proguard-rules.pro @@ -0,0 +1,26 @@ +# Add project specific ProGuard rules here. +# 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 *; +#} + + +# Workaround for Samsung Android 4.2 bug +# https://code.google.com/p/android/issues/detail?id=78377 +# https://code.google.com/p/android/issues/detail?id=78377#c188 +-keepattributes ** +-keep class !android.support.v7.internal.view.menu.**,** {*;} +-dontpreverify +-dontoptimize +-dontshrink +-dontwarn ** \ No newline at end of file