Skip to content

Commit

Permalink
fix: [Android] issue with proguard on release builds (#15)
Browse files Browse the repository at this point in the history
* fix: [Android] proguard configuration file
  • Loading branch information
reime005 authored Apr 10, 2020
1 parent 9fd9dd1 commit cefc83d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ android {
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
targetSdkVersion safeExtGet('targetSdkVersion', 28)

consumerProguardFiles("proguard-rules.pro")
}

buildTypes {
Expand Down
21 changes: 21 additions & 0 deletions android/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# see https://dev.tapjoy.com/sdk-integration/android/getting-started-guide-advertisers-android/

-keep class com.tapjoy.** { *; }
-keep class com.moat.** { *; }
-keepattributes JavascriptInterface
-keepattributes *Annotation*
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
-keep class com.google.android.gms.ads.identifier.** { *; }
-dontwarn com.tapjoy.**
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-tapjoy",
"description": "A React Native module that allows you to use the native Tapjoy advertiser SDK.",
"version": "2.4.1",
"version": "2.4.2-beta.1",
"license": "MIT",
"main": "src/index.js",
"author": "Marius Reimer (reime005) <[email protected]> (https://mariusreimer.com)",
Expand Down

0 comments on commit cefc83d

Please sign in to comment.