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

Commit

Permalink
Release: version 5.10.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Bichen Wang and Ryan McCormick committed Oct 30, 2019
1 parent bd38b34 commit 166b566
Show file tree
Hide file tree
Showing 40 changed files with 843 additions and 264 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## Version 5.10.0 (October 30, 2019)
- **Features**
- Activities no longer need to be declared when using maven or `.aar`s.
- Upgrade Android Gradle plugin dependency to 3.5.1.
- Add the `androidx.appcompat:appcompat` dependency to support default themes in MoPub activities.
- Add support for the Verizon native ad renderer.
- Sample app now has an example manual native integration.

- **Bug Fixes**
- VAST skip trackers are no longer always fired when the video is closed. They only fire if the video is closed when the video still has time remaining.
- Adding new ad units to the sample app is now immediate.

## Version 5.9.1 (September 23, 2019)
- **Bug Fixes**
- Now sends ad width in pixels instead of dips when setting a `MoPubAdSize`.
Expand Down
28 changes: 26 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,35 @@
#!/usr/bin/env groovy
def androidAutomationProjectName = "mopub-android-automation"

pipeline {
agent any
environment {
ANDROID_HOME = '/Users/jenkins/Library/Android/sdk'
projectName = """${sh(script: 'IFS="/" read -ra TOKENS <<< "${JOB_NAME}"; echo ${TOKENS[0]}', returnStdout: true).trim()}"""
}
stages {
stage('Build') {
stage('Tests') {
steps {
sh './gradlew clean build'
script {
if(projectName == androidAutomationProjectName) {
stage('Android automation tests') {
echo "Android Automation Tests are running - ${env.JOB_NAME}"
sh '''
#!/bin/bash
chmod +x android.sh
./android.sh
'''
}
} else {
stage('Smoke tests') {
echo "Smoke Tests are running - ${env.JOB_NAME}"
sh '''
#!/bin/bash
./gradlew clean build
'''
}
}
}
}
}
}
Expand All @@ -19,4 +41,6 @@ pipeline {
slackSend color: 'RED', message: "Attention @here <${env.BUILD_URL}|${env.JOB_NAME} #${env.BUILD_NUMBER}> has failed."
}
}

}

29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The MoPub SDK is available via:
}
dependencies {
implementation('com.mopub:mopub-sdk:5.9.1@aar') {
implementation('com.mopub:mopub-sdk:5.10.0@aar') {
transitive = true
}
}
Expand All @@ -59,27 +59,27 @@ The MoPub SDK is available via:
// ... other project dependencies
// For banners
implementation('com.mopub:mopub-sdk-banner:5.9.1@aar') {
implementation('com.mopub:mopub-sdk-banner:5.10.0@aar') {
transitive = true
}
// For interstitials
implementation('com.mopub:mopub-sdk-interstitial:5.9.1@aar') {
implementation('com.mopub:mopub-sdk-interstitial:5.10.0@aar') {
transitive = true
}
// For rewarded videos. This will automatically also include interstitials
implementation('com.mopub:mopub-sdk-rewardedvideo:5.9.1@aar') {
implementation('com.mopub:mopub-sdk-rewardedvideo:5.10.0@aar') {
transitive = true
}
// For native static (images).
implementation('com.mopub:mopub-sdk-native-static:5.9.1@aar') {
implementation('com.mopub:mopub-sdk-native-static:5.10.0@aar') {
transitive = true
}
// For native video. This will automatically also include native static
implementation('com.mopub:mopub-sdk-native-video:5.9.1@aar') {
implementation('com.mopub:mopub-sdk-native-video:5.10.0@aar') {
transitive = true
}
}
Expand Down Expand Up @@ -107,17 +107,26 @@ The MoPub SDK is available via:
## New in this Version
Please view the [changelog](https://github.com/mopub/mopub-android-sdk/blob/master/CHANGELOG.md) for a complete list of additions, fixes, and enhancements in the latest release.
- **Features**
- Activities no longer need to be declared when using maven or `.aar`s.
- Upgrade Android Gradle plugin dependency to 3.5.1.
- Add the `androidx.appcompat:appcompat` dependency to support default themes in MoPub activities.
- Add support for the Verizon native ad renderer.
- Sample app now has an example manual native integration.
- **Bug Fixes**
- Now sends ad width in pixels instead of dips when setting a `MoPubAdSize`.
- VAST skip trackers are no longer always fired when the video is closed. They only fire if the video is closed when the video still has time remaining.
- Adding new ad units to the sample app is now immediate.
## Requirements
- Android 4.1 (API Version 16) and up (**Updated in 4.12.0**)
- androidx.legacy:legacy-support-v4:1.0.0 (**Updated in 5.9.0**)
- androidx.annotation:annotation:1.1.0 (**Updated in 5.9.0**)
- androidx.appcompat:appcompat:1.1.0 (**Updated in 5.10.0**)
- androidx.recyclerview:recyclerview:1.0.0 (**Updated in 5.9.0**)
- MoPub Volley Library (mopub-volley-2.1.0.jar - available on JCenter) (**Updated in 5.6.0**)
- **Recommended** Google Play Services (com.google.android.gms:play-services-ads-identifier:16.0.0 and com.google.android.gms:play-services-base:16.0.1) (**Updated in 5.6.0**)
- **Recommended** Google Play Services (com.google.android.gms:play-services-ads-identifier:17.0.0 and com.google.android.gms:play-services-base:17.1.0) (**Updated in 5.10.0**)
## Upgrading to SDK 5.0
Expand All @@ -137,7 +146,7 @@ Normally, to add the MoPub SDK to your app via JCenter, your `build.gradle` woul
```
dependencies {
implementation('com.mopub:mopub-sdk:5.9.1@aar') {
implementation('com.mopub:mopub-sdk:5.10.0@aar') {
transitive = true
}
}
Expand All @@ -146,7 +155,7 @@ Update to the following to exclude one or both viewability vendors:
```
dependencies {
implementation('com.mopub:mopub-sdk:5.9.1@aar') {
implementation('com.mopub:mopub-sdk:5.10.0@aar') {
transitive = true
exclude module: 'libAvid-mopub' // To exclude AVID
exclude module: 'moat-mobile-app-kit' // To exclude Moat
Expand Down
81 changes: 81 additions & 0 deletions android.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
#! /bin/bash

# Run with: [mopub-android]$ chmod +x android.sh && ./android.sh
sdk_manager_dir="$HOME/Library/Android/sdk/tools/bin"
avd_manager_dir="$HOME/Library/Android/sdk/tools/bin"
device_emulator_dir="$HOME/Library/Android/sdk/emulator"
adb_dir="$HOME/Library/Android/sdk/platform-tools"
mopub_sample_dir="$(pwd)/mopub-sample"
gradle_dir="$HOME/.gradle/wrapper/dists/gradle-5.4.1-bin/*/gradle-5.4.1/bin"

# Generate Gradle wrapper files
cd $mopub_sample_dir
$gradle_dir/gradle wrapper

# Kill any running emulator
cd $adb_dir
./adb emu kill
./adb devices | grep "emulator-" | while read -r emulator device; do ./adb -s $emulator emu kill; done

echo "list of all Running emulators/Devices"
$adb_dir/adb devices

# Create new AVD (Android Virtual Device):
cd $avd_manager_dir
(echo "no") | ./avdmanager create avd -n testavd -k "system-images;android-29;google_apis;x86" --device "pixel_xl" --sdcard 128M --force

# Start an emulator/device from an AVD: [in the background]
cd $device_emulator_dir
./emulator -avd testavd -no-boot-anim &

# Wait for emulator/device to start
while [ "`$adb_dir/adb shell getprop sys.boot_completed | tr -d '\r' `" != "1" ] ; do echo "Waiting for emulator to boot"; sleep 15; done

echo "list of all Running emulators/Devices"
$adb_dir/adb devices

# ************ Set up Environment, Install APKs, Run tests, Uninstall APKs, Kill emulator ***************

# Give Gradle execution permission:
cd $mopub_sample_dir
chmod +x gradlew

# Create APK for mopub-sample app:
./gradlew assembleDebug --stacktrace

# Create test APK for mopub-sample app:
./gradlew assembleAndroidTest --stacktrace

# Install mopub-sample app APK: [Grant Permissions]
cd $adb_dir
./adb push $mopub_sample_dir/build/outputs/apk/external/debug/mopub-sample-external-debug.apk /data/local/tmp/com.mopub.simpleadsdemo
./adb shell pm install -g -t -r "/data/local/tmp/com.mopub.simpleadsdemo"

# Install test APK: [Grant Permissions]
./adb push $mopub_sample_dir/build/outputs/apk/androidTest/external/debug/mopub-sample-external-debug-androidTest.apk /data/local/tmp/com.mopub.simpleadsdemo.test
./adb shell pm install -g -t -r "/data/local/tmp/com.mopub.simpleadsdemo.test"

# Enable fullscreen mode & Run All Tests:
echo "Test run starts"
./adb shell settings put global policy_control immersive.full=com.mopub.simpleadsdemo
test_report=$(./adb shell am instrument -w -r -e package com.mopub.tests -e debug false com.mopub.simpleadsdemo.test/androidx.test.runner.AndroidJUnitRunner)

# Show test report
echo "$test_report"

# Clean-up: Uninstall mopub-sample app, test app
./adb uninstall com.mopub.simpleadsdemo
./adb uninstall com.mopub.simpleadsdemo.test

# Clean-up: Kill any running emulator
cd $adb_dir
./adb emu kill
./adb devices | grep "emulator-" | while read -r emulator device; do ./adb -s $emulator emu kill; done

echo "list of all Running emulators/Devices"
$adb_dir/adb devices

# Terminate shell with appropriate exit code
exitcmd=$(if echo "$test_report" | grep -q 'FAILURES!!!'; then echo "exit 1"; else echo "exit 0"; fi)
echo "Exiting terminal with command: $exitcmd"
$exitcmd
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'com.android.tools.build:gradle:3.5.1'
classpath 'com.novoda:bintray-release:0.9.1'
}
}
62 changes: 32 additions & 30 deletions mopub-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ apply plugin: 'com.android.application'

project.group = 'com.mopub'
project.description = '''MoPub Sample App'''
project.version = '5.9.1'
project.version = '5.10.0'

android {
compileSdkVersion 29
Expand All @@ -36,11 +36,12 @@ android {
}

defaultConfig {
versionCode 73
versionCode 75
versionName version
minSdkVersion 16
targetSdkVersion 29
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt')

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
Expand All @@ -58,11 +59,9 @@ android {
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard.cfg'
}
}

Expand All @@ -86,42 +85,41 @@ android {

dependencies {
// Third party Custom Network Adapters
implementation 'com.adcolony:sdk:3.3.10'
implementation 'com.google.android.gms:play-services-ads:17.2.0'
implementation "com.applovin:applovin-sdk:9.7.2"
implementation 'com.adcolony:sdk:4.1.0'
implementation 'com.google.android.gms:play-services-ads:18.2.0'
implementation "com.applovin:applovin-sdk:9.9.2"
// Commented out since we cannot distribute 3rd party libraries
// implementation name: 'chartboost-7.3.1'
implementation 'com.facebook.android:audience-network-sdk:5.4.0'
implementation 'com.flurry.android:ads:11.6.0'
implementation 'com.flurry.android:analytics:11.6.0'
implementation 'com.ironsource.sdk:mediationsdk:6.8.5@jar'
implementation 'com.tapjoy:tapjoy-android-sdk:12.3.1@aar'
implementation 'com.unity3d.ads:unity-ads:3.1.0@aar'
implementation 'com.verizon.ads:android-vas-standard-edition:1.1.1'
// Vungle and its dependencies.
implementation 'com.github.vungle:vungle-android-sdk:6.3.24'
// implementation name: 'chartboost-7.5.0'
implementation 'com.facebook.android:audience-network-sdk:5.5.0'
implementation 'com.flurry.android:ads:11.7.1'
implementation 'com.flurry.android:analytics:11.7.1'
implementation 'com.ironsource.sdk:mediationsdk:6.10.1@jar'
implementation 'com.tapjoy:tapjoy-android-sdk:12.3.4@aar'
implementation 'com.unity3d.ads:unity-ads:3.3.0@aar'
implementation 'com.verizon.ads:android-vas-standard-edition:1.2.0'
implementation 'com.github.vungle:vungle-android-sdk:6.4.11'

// MoPub Custom Network Adapters
implementation 'com.mopub.mediation:adcolony:3.3.10.0'
implementation 'com.mopub.mediation:admob:17.2.0.2'
implementation 'com.mopub.mediation:applovin:9.7.2.0'
implementation 'com.mopub.mediation:adcolony:4.1.0.0'
implementation 'com.mopub.mediation:admob:18.2.0.3'
implementation 'com.mopub.mediation:applovin:9.9.2.1'
// Commented out since we do not include the corresponding library
// implementation 'com.mopub.mediation:chartboost:7.3.1.4'
implementation 'com.mopub.mediation:facebookaudiencenetwork:5.4.0.0'
implementation 'com.mopub.mediation:flurry:11.6.0.2'
implementation 'com.mopub.mediation:ironsource:6.8.5.0'
implementation 'com.mopub.mediation:tapjoy:12.3.1.0'
implementation 'com.mopub.mediation:unityads:3.1.0.0'
implementation 'com.mopub.mediation:verizon:1.1.1.1'
implementation 'com.mopub.mediation:vungle:6.3.24.4'
// implementation 'com.mopub.mediation:chartboost:7.5.0.2'
implementation 'com.mopub.mediation:facebookaudiencenetwork:5.5.0.8'
implementation 'com.mopub.mediation:flurry:11.7.1.1'
implementation 'com.mopub.mediation:ironsource:6.10.1.0'
implementation 'com.mopub.mediation:tapjoy:12.3.4.0'
implementation 'com.mopub.mediation:unityads:3.3.0.0@aar'
implementation 'com.mopub.mediation:verizon:1.2.0.1'
implementation 'com.mopub.mediation:vungle:6.4.11.4'

implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-ads-identifier:16.0.0'
implementation 'com.google.android.gms:play-services-base:16.0.1'
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
implementation 'com.google.android.gms:play-services-base:17.1.0'
implementation project(':mopub-sdk')

// Instrumentation testing-only dependencies
Expand All @@ -130,3 +128,7 @@ dependencies {
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-intents:3.2.0'
}

task wrapper(type: Wrapper) {
gradleVersion = '5.4.1' //gradle version is required
}
41 changes: 0 additions & 41 deletions mopub-sample/proguard.cfg

This file was deleted.

Loading

0 comments on commit 166b566

Please sign in to comment.