Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from mike-n-jordan/5.18.0-patch-1
Browse files Browse the repository at this point in the history
5.18.0 patch 1 - allowing the client to provide the UserAgent
  • Loading branch information
mike-n-jordan authored Feb 4, 2022
2 parents 0f0a976 + fb071be commit d115599
Show file tree
Hide file tree
Showing 716 changed files with 25,752 additions and 41,447 deletions.
65 changes: 63 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,67 @@
## Version 5.14.1 (November 12, 2020)
## Version 5.18.0 (August 4, 2021)
- **Features**
- Fixed null pointer exception in MoPubFullscreen when adExpired after listener cleared
- Change when the close button and countdown timer are presented.
- Add InMobi, Fyber, Ogury, and Mintegral as supported networks.
- Switch to using XML instead of programmatic layouts for fullscreen ads.
- Show the reward selection pop-up dialog regardless of number of reward choices in the sample app.

- **Bug Fixes**
- Fix NPEs in `MoPubInline` caused by `InteractionListener`
- Fix OM SDK `OutOfMemoryError` crash.
- Fix custom deeplinks not opening on Android 11.
- Prevent pre-initialization use of some public APIs from corrupting ad requests.

## Version 5.17.0 (May 11, 2021)
- **Features**
- SDK binary artifacts are uploaded to Maven Central Repository.
- Update AndroidX Media2 dependencies from version 1.1.1 to 1.1.3.
- Improve MoPub SDK modularization with 'mopub-sdk-networking' and 'mopub-sdk-util' libraries.
- Add ProGuard rules for AudioFocusHandler and MediaPlayer.

- **Bug Fixes**
- Fix rare audio focus handling issue when application is in the background.

## Version 5.16.4 (March 31, 2021)
- **Bug Fixes**
- Fix `InvalidStateException` when finishing VAST videos on some devices.

## Version 5.16.3 (March 24, 2021)
- **Bug Fixes**
- Handle WebViewClient#onRenderProcessGone for API 26+ devices regarding the VAST icon WebView so WebView crashes do not take the entire process with it.
- Fix rewarded video duration calculation.
- Fix rare `InvalidStateException` when finishing a VAST video with a companion image.
- Fix `UnsupportedOperationException` caused by non-hierarchical URIs.
- Fix release issues from 5.16.2.

## Version 5.16.2 (March 18, 2021) *Deprecated*
- **Bug Fixes**
- Handle WebViewClient#onRenderProcessGone for API 26+ devices regarding the VAST icon WebView so WebView crashes do not take the entire process with it.
- Fix rewarded video duration calculation.
- Fix rare `InvalidStateException` when finishing a VAST video with a companion image.
- Fix `UnsupportedOperationException` caused by non-hierarchical URIs.

## Version 5.16.0 (February 16, 2021)
- **Features**
- Add support for rewarded display ads and rewarded ads with rich media end cards. See [Integration Steps](https://developers.mopub.com/publishers/android/rewarded-ad/).
- Rename `MoPubRewardedVideos` to `MoPubRewardedAds` and `MoPubRewardedVideoListener` to `MoPubRewardedAdListener`. See the [API Reference](https://developers.mopub.com/publishers/reference/android/MoPub/) for more details.
- Add 5G cellular support.
- Update AndroidX Media2 dependencies from version 1.0.1 to 1.1.1.

- **Bug Fixes**
- Fix crash when adding a theme to native recycler view layout.
- Fix memory leak when destroy is called on a fullscreen ad.
- Fix rotation for ads without an orientation specified.
- Fix rewarded ads being playable after they have expired.
- Address clickability issues with image and rewarded ads.
- Address `MoPubRewardedVideos.hasRewardedVideo()` returning the wrong value in certain instances.

## Version 5.15.0 (November 18, 2020)
- **Features**
- Update countdown animation background color to black for better visibility.
- Enforce HTTPS for base URLs.
- Remove native video support.
- Add support for Snap Audience Network.
- Update sample app dependency on `com.google.android.gms:play-services-base` from version 17.3.0 to 17.5.0.

## Version 5.14.0 (October 1, 2020)
- **Features**
Expand Down
119 changes: 119 additions & 0 deletions Jenkinsauto
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
#!/usr/bin/env groovy

pipeline {
agent any
environment {
ANDROID_HOME = '/Users/jenkins/Library/Android/sdk'
ANDROID_BUILD_TOOLS_VERSION = '30.0.3'
ANDROID_CONNECTED_TEST_RETRY_COUNT = 3

APK_INTERNAL_RELEASE_SIGNED = 'mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-signed.apk'
APK_INTERNAL_RELEASE_UNSIGNED = 'mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned.apk'
APK_INTERNAL_RELEASE_UNSIGNED_ALIGNED = 'mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned-aligned.apk'

APK_EXTERNAL_RELEASE_SIGNED = 'mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-signed.apk'
APK_EXTERNAL_RELEASE_UNSIGNED = 'mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned.apk'
APK_EXTERNAL_RELEASE_UNSIGNED_ALIGNED = 'mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned-aligned.apk'

projectName = """${
sh(script: 'IFS="/" read -ra TOKENS <<< "${JOB_NAME}"; echo ${TOKENS[0]}', returnStdout: true).trim()
}"""
PARSED_JOB_NAME = URLDecoder.decode(env.JOB_NAME, 'UTF-8')
}

stages {
stage('Build AARs') {
steps {
echo "Building the MoPub SDK AARs"
sh '''
#!/bin/bash
./gradlew clean
./gradlew :mopub-sdk:build -x test
./gradlew :mopub-sdk:mopub-sdk-base:build -x test
./gradlew :mopub-sdk:mopub-sdk-banner:build -x test
./gradlew :mopub-sdk:mopub-sdk-fullscreen:build -x test
./gradlew :mopub-sdk:mopub-sdk-native-static:build -x test
./gradlew :mopub-sdk:mopub-sdk-networking:build -x test
./gradlew :mopub-sdk:mopub-sdk-util:build -x test
'''
}
}
stage('Build APKs') {
steps {
echo "Building the MoPub Sample App"
sh '''
#!/bin/bash
./gradlew :mopub-sample:build -x test
'''
}
}
stage('Internal automation tests') {
steps {
echo "Internal Automation Tests are running - ${PARSED_JOB_NAME}"
sh '''
#!/bin/bash
chmod +x scripts/private/androidRT.sh
scripts/private/androidRT.sh
'''
}
}
stage('External automation tests') {
steps {
echo "External Automation Tests are running - ${PARSED_JOB_NAME}"
sh '''
#!/bin/bash
chmod +x scripts/private/android.sh
scripts/private/android.sh
'''
}
}

stage('Sign apk Internal') {
steps {
// Remove old APKs generated by this step
sh 'rm -f $APK_INTERNAL_RELEASE_SIGNED'
sh 'rm -f $APK_INTERNAL_RELEASE_UNSIGNED_ALIGNED'

// Create unsigned and aligned APK from unsigned APK
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/zipalign -v -p 4 $APK_INTERNAL_RELEASE_UNSIGNED $APK_INTERNAL_RELEASE_UNSIGNED_ALIGNED'

// Use credentials to create signed APK from unsigned and aligned APK
withCredentials([string(credentialsId: 'android_store_key_pass', variable: 'JKS_PASS')]) {
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/apksigner sign --ks ~/google_play_key.jks --ks-pass pass:$JKS_PASS --out $APK_INTERNAL_RELEASE_SIGNED $APK_INTERNAL_RELEASE_UNSIGNED_ALIGNED'
}
}
}
stage('Sign apk External') {
steps {
// Remove old APKs generated by this step
sh 'rm -f $APK_EXTERNAL_RELEASE_SIGNED'
sh 'rm -f $APK_EXTERNAL_RELEASE_UNSIGNED_ALIGNED'

// Create unsigned and aligned APK from unsigned APK
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/zipalign -v -p 4 $APK_EXTERNAL_RELEASE_UNSIGNED $APK_EXTERNAL_RELEASE_UNSIGNED_ALIGNED'

// Use credentials to create signed APK from unsigned and aligned APK
withCredentials([string(credentialsId: 'android_store_key_pass', variable: 'JKS_PASS')]) {
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/apksigner sign --ks ~/google_play_key.jks --ks-pass pass:$JKS_PASS --out $APK_EXTERNAL_RELEASE_SIGNED $APK_EXTERNAL_RELEASE_UNSIGNED_ALIGNED'
}
}
}

stage('Archive') {
steps {
archiveArtifacts artifacts: 'mopub-sample/build/outputs/**/*.apk', excludes: 'mopub-sample/build/outputs/**/*unsigned.apk, mopub-sample/build/outputs/**/*aligned.apk', onlyIfSuccessful: true
archiveArtifacts artifacts: 'mopub-sdk/build/outputs/aar/mopub-sdk-*.aar', onlyIfSuccessful: true
archiveArtifacts artifacts: 'mopub-sdk/mopub-sdk-*/build/outputs/aar/mopub-sdk-*.aar', onlyIfSuccessful: true
}
}
}

post {
fixed {
slackSend color: 'GREEN', message: "<${env.BUILD_URL}|${PARSED_JOB_NAME} #${env.BUILD_NUMBER}> has succeeded."
}
failure {
slackSend color: 'RED', message: "Attention @here <${env.BUILD_URL}|${PARSED_JOB_NAME} #${env.BUILD_NUMBER}> has failed."
}
}
}
74 changes: 29 additions & 45 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,65 +1,49 @@
#!/usr/bin/env groovy
def androidAutomationProjectName = "mopub-android-automation"

pipeline {
agent any
environment {
ANDROID_HOME = '/Users/jenkins/Library/Android/sdk'
ANDROID_BUILD_TOOLS_VERSION = '30.0.3'
projectName = """${
sh(script: 'IFS="/" read -ra TOKENS <<< "${JOB_NAME}"; echo ${TOKENS[0]}', returnStdout: true).trim()
}"""
PARSED_JOB_NAME = URLDecoder.decode(env.JOB_NAME, 'UTF-8')
}
stages {
stage('Tests') {
stage('Unit Tests') {
steps {
echo "Smoke Tests are running - ${PARSED_JOB_NAME}"
sh '''
#!/bin/bash
./gradlew clean build
'''
}
}

stage('Sign apk') {
steps {
script {
PARSED_JOB_NAME = URLDecoder.decode(env.JOB_NAME, 'UTF-8')
if (projectName == androidAutomationProjectName) {
stage('Internal Android automation tests') {
echo "Internal Automation Tests are running - ${PARSED_JOB_NAME}"
sh '''
#!/bin/bash
chmod +x scripts/private/android.sh
scripts/private/android.sh
'''
}
stage('External Android automation tests') {
echo "External Automation Tests are running - ${PARSED_JOB_NAME}"
sh '''
#!/bin/bash
chmod +x scripts/private/androidRT.sh
scripts/private/androidRT.sh
'''
}
} else {
stage('Smoke tests') {
echo "Smoke Tests are running - ${PARSED_JOB_NAME}"
sh '''
#!/bin/bash
./gradlew clean build
'''
}
stage('Sign apk') {
sh '$ANDROID_HOME/build-tools/29.0.2/zipalign -v -p 4 mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned.apk mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned-aligned.apk'
if (fileExists('mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned.apk')) {
sh '$ANDROID_HOME/build-tools/29.0.2/zipalign -v -p 4 mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned.apk mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned-aligned.apk'
}
withCredentials([string(credentialsId: 'android_store_key_pass', variable: 'JKS_PASS')]) {
sh '$ANDROID_HOME/build-tools/29.0.2/apksigner sign --ks ~/google_play_key.jks --ks-pass pass:$JKS_PASS --out mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-signed.apk mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned-aligned.apk'
if (fileExists('mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned-aligned.apk')) {
sh '$ANDROID_HOME/build-tools/29.0.2/apksigner sign --ks ~/google_play_key.jks --ks-pass pass:$JKS_PASS --out mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-signed.apk mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned-aligned.apk'
}
}
}
stage('Archive') {
archiveArtifacts artifacts: 'mopub-sample/build/outputs/**/*.apk', excludes: 'mopub-sample/build/outputs/**/*unsigned.apk, mopub-sample/build/outputs/**/*aligned.apk', onlyIfSuccessful: true
archiveArtifacts artifacts: 'mopub-sdk/build/outputs/aar/mopub-sdk-*.aar', onlyIfSuccessful: true
archiveArtifacts artifacts: 'mopub-sdk/mopub-sdk-*/build/outputs/aar/mopub-sdk-*.aar', onlyIfSuccessful: true
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/zipalign -v -p 4 mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned.apk mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned-aligned.apk'
if (fileExists('mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned.apk')) {
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/zipalign -v -p 4 mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned.apk mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned-aligned.apk'
}
withCredentials([string(credentialsId: 'android_store_key_pass', variable: 'JKS_PASS')]) {
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/apksigner sign --ks ~/google_play_key.jks --ks-pass pass:$JKS_PASS --out mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-signed.apk mopub-sample/build/outputs/apk/external/release/mopub-sample-external-release-unsigned-aligned.apk'
if (fileExists('mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned-aligned.apk')) {
sh '$ANDROID_HOME/build-tools/$ANDROID_BUILD_TOOLS_VERSION/apksigner sign --ks ~/google_play_key.jks --ks-pass pass:$JKS_PASS --out mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-signed.apk mopub-sample/build/outputs/apk/internal/release/mopub-sample-internal-release-unsigned-aligned.apk'
}
}
}
}
}

stage('Archive') {
steps {
archiveArtifacts artifacts: 'mopub-sample/build/outputs/**/*.apk', excludes: 'mopub-sample/build/outputs/**/*unsigned.apk, mopub-sample/build/outputs/**/*aligned.apk', onlyIfSuccessful: true
archiveArtifacts artifacts: 'mopub-sdk/build/outputs/aar/mopub-sdk-*.aar', onlyIfSuccessful: true
archiveArtifacts artifacts: 'mopub-sdk/mopub-sdk-*/build/outputs/aar/mopub-sdk-*.aar', onlyIfSuccessful: true
}
}
}
post {
fixed {
Expand Down
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
The MoPub SDK License can be found at [http://www.mopub.com/legal/sdk-license-agreement/](http://www.mopub.com/legal/sdk-license-agreement/) and the Apache 2.0 License can be found at [http://www.apache.org/licenses/LICENSE-2.0] (http://www.apache.org/licenses/LICENSE-2.0).
The MoPub SDK License can be found at [http://www.mopub.com/legal/sdk-license-agreement/](http://www.mopub.com/legal/sdk-license-agreement/).

Please note that some of the resources in this package are licensed under The Apache 2.0 license, including Disk LRU Cache, Volley, and Exoplayer.
Please note that some of the resources in this package are licensed under The Apache 2.0 license (http://www.apache.org/licenses/LICENSE-2.0), including Disk LRU Cache, Volley, and Exoplayer.
Please note that some of the resources in this package are licensed under The MIT license (https://opensource.org/licenses/MIT), including mockito-kotlin.
Loading

0 comments on commit d115599

Please sign in to comment.