diff --git a/components/places/android/library/build.gradle b/components/places/android/library/build.gradle index 373b4217e..062bcba53 100644 --- a/components/places/android/library/build.gradle +++ b/components/places/android/library/build.gradle @@ -17,6 +17,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + consumerProguardFiles "$rootDir/proguard-rules-consumer-jna.pro" } withoutLib { diff --git a/composites/lockbox/android/library/build.gradle b/composites/lockbox/android/library/build.gradle index c64ec94b7..d9dd6c81f 100644 --- a/composites/lockbox/android/library/build.gradle +++ b/composites/lockbox/android/library/build.gradle @@ -17,6 +17,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + consumerProguardFiles "$rootDir/proguard-rules-consumer-jna.pro" } } diff --git a/composites/reference-browser/android/library/build.gradle b/composites/reference-browser/android/library/build.gradle index fecf1df76..5a7dc16ad 100644 --- a/composites/reference-browser/android/library/build.gradle +++ b/composites/reference-browser/android/library/build.gradle @@ -17,6 +17,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + consumerProguardFiles "$rootDir/proguard-rules-consumer-jna.pro" } } diff --git a/fxa-client/sdks/android/library/build.gradle b/fxa-client/sdks/android/library/build.gradle index 6bf178a0c..44db01c14 100644 --- a/fxa-client/sdks/android/library/build.gradle +++ b/fxa-client/sdks/android/library/build.gradle @@ -17,6 +17,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + consumerProguardFiles "$rootDir/proguard-rules-consumer-jna.pro" } withoutLib { diff --git a/logins-api/android/library/build.gradle b/logins-api/android/library/build.gradle index 342a0e3c3..6bcf24b67 100644 --- a/logins-api/android/library/build.gradle +++ b/logins-api/android/library/build.gradle @@ -17,6 +17,7 @@ android { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' + consumerProguardFiles "$rootDir/proguard-rules-consumer-jna.pro" } withoutLib { diff --git a/proguard-rules-consumer-jna.pro b/proguard-rules-consumer-jna.pro new file mode 100644 index 000000000..444bdc274 --- /dev/null +++ b/proguard-rules-consumer-jna.pro @@ -0,0 +1,7 @@ +# ProGuard rules for consumers of this library. + +# JNA specific rules +# See https://github.com/java-native-access/jna/blob/master/www/FrequentlyAskedQuestions.md#jna-on-android +-dontwarn java.awt.* +-keep class com.sun.jna.* { *; } +-keepclassmembers class * extends com.sun.jna.* { public *; } \ No newline at end of file