Skip to content

Commit

Permalink
Add proguard rules (#39)
Browse files Browse the repository at this point in the history
* Add proguard rules

* Update docs.

* Include rules in AAR
  • Loading branch information
CB-RyanMcCormick authored May 30, 2023
1 parent 83954cc commit 013d331
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
Note the first digit of every adapter version corresponds to the major version of the Chartboost Mediation SDK compatible with that adapter.
Adapters are compatible with any Chartboost Mediation SDK version within that major version.

### 4.6.12.1.3
- Added ProGuard rules.

### 4.6.12.1.2
- Added support for rewarded interstitial ad format.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The Chartboost Mediation Vungle adapter mediates Vungle via the Chartboost Media

In your `build.gradle`, add the following entry:
```
implementation "com.chartboost:chartboost-mediation-adapter-vungle:4.6.12.1.2"
implementation "com.chartboost:chartboost-mediation-adapter-vungle:4.6.12.1.3"
```

## Contributions
Expand Down
4 changes: 3 additions & 1 deletion VungleAdapter/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ android {
minSdk = 21
targetSdk = 33
// If you touch the following line, don't forget to update scripts/get_rc_version.zsh
android.defaultConfig.versionName = System.getenv("VERSION_OVERRIDE") ?: "4.6.12.1.2"
android.defaultConfig.versionName = System.getenv("VERSION_OVERRIDE") ?: "4.6.12.1.3"
buildConfigField("String", "CHARTBOOST_MEDIATION_VUNGLE_ADAPTER_VERSION", "\"${android.defaultConfig.versionName}\"")

consumerProguardFiles("proguard-rules.pro")

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

Expand Down
24 changes: 24 additions & 0 deletions VungleAdapter/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,27 @@
# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

# Vungle
-dontwarn com.vungle.warren.downloader.DownloadRequestMediator$Status
-dontwarn com.vungle.warren.error.VungleError$ErrorCode

# Google
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**

# GSON
-keepattributes *Annotation*
-keepattributes Signature
# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}

# OkHttp + Okio
-dontwarn javax.annotation.**
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
-dontwarn org.codehaus.mojo.animal_sniffer.*
-dontwarn okhttp3.internal.platform.ConscryptPlatform

-dontwarn module-info

0 comments on commit 013d331

Please sign in to comment.