Skip to content

Commit 1288634

Browse files
committed
Version 3.9.0 of the Google Mobile Ads Unity plugin
1 parent 96fc4dc commit 1288634

File tree

40 files changed

+475
-65
lines changed

40 files changed

+475
-65
lines changed

ChangeLog.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
Google Mobile Ads Unity Plugin Change Log
22

3+
*************
4+
Version 3.9.0
5+
*************
6+
7+
- Implemented workaround for issue where ad views are rendered in incorrect
8+
position.
9+
- Resolved compatibility issues with Gradle 4.
10+
- Resovled comnpatilbity issues with older versions of Xcode.
11+
- Added API for video ad volume control.
12+
- Added AdColony mediation support package.
13+
- Added AppLovin mediation support package.
14+
15+
Built and tested with:
16+
- Google Play services 11.6.0
17+
- Google Mobile Ads iOS SDK 7.25.0
18+
- Unity Jar Resolver 1.2.59.0
19+
320
*************
421
Version 3.8.0
522
*************

mediation/AdColony/build.gradle

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Gradle file to build a Unity package to add AdColony mediation support to the Google Mobile Ads Unity plugin.
3+
* Usage: ./gradlew exportPackage
4+
*/
5+
6+
defaultTasks 'exportPackage'
7+
8+
// Project level variables.
9+
project.ext {
10+
unity_exe = System.getProperty("UNITY_EXE")
11+
if (unity_exe == null || unity_exe.isEmpty()) {
12+
unity_exe = System.getenv("UNITY_EXE")
13+
}
14+
if (unity_exe == null || unity_exe.isEmpty()) {
15+
unity_exe = '/Applications/Unity/Unity.app/Contents/MacOS/Unity'
16+
}
17+
18+
if (!file(unity_exe).exists()) {
19+
throw new GradleException('Unable to locate installation of Unity. Please create a ' +
20+
'UNITY_EXE environment variable and point it to your Unity installation.')
21+
}
22+
23+
pluginSource = file('source/plugin').absolutePath
24+
pluginBuildDir = file('temp/plugin-build-dir').absolutePath
25+
buildPath = file('temp').absolutePath
26+
exportPath = file('GoogleMobileAdsAdColonyMediation.unitypackage').absolutePath
27+
}
28+
29+
// Build unity package using through command line interface.
30+
// Create new unity project with files in temporary build directory and export files to a unity package.
31+
// Command line usage and arguments documented at http://docs.unity3d.com/Manual/CommandLineArguments.html.
32+
task exportPackage(type: Exec) {
33+
description = "Creates and exports the Plugin unity package"
34+
executable "${unity_exe}"
35+
args "-g.building",
36+
"-batchmode",
37+
"-projectPath", "${pluginBuildDir}",
38+
"-logFile", "temp/unity.log",
39+
"-exportPackage",
40+
"Assets/GoogleMobileAds/Editor",
41+
"Assets/Plugins",
42+
"${exportPath}",
43+
"-quit"
44+
45+
ignoreExitValue true
46+
47+
doLast {
48+
if (execResult.getExitValue() != 0) {
49+
copy {
50+
from "temp/"
51+
into "./"
52+
include "unity.log"
53+
}
54+
}
55+
}
56+
}
57+
58+
task createTempBuildFolder(type: Copy) {
59+
from { "${pluginSource}" }
60+
into { "${pluginBuildDir}" }
61+
}
62+
63+
task clearTempBuildFolder(type: Delete) {
64+
delete { "${buildPath}" }
65+
}
66+
67+
exportPackage.dependsOn(createTempBuildFolder)
68+
exportPackage.finalizedBy(clearTempBuildFolder)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<dependencies>
2+
<androidPackages>
3+
<androidPackage spec="com.google.ads.mediation:adcolony:3.2.1.1">
4+
<repositories>
5+
<repository>https://adcolony.bintray.com/AdColony</repository>
6+
</repositories>
7+
</androidPackage>
8+
<androidPackage spec="com.adcolony:sdk:3.2.1">
9+
<repositories>
10+
<repository>https://adcolony.bintray.com/AdColony</repository>
11+
</repositories>
12+
</androidPackage>
13+
</androidPackages>
14+
15+
<iosPods>
16+
<iosPod name="GoogleMobileAdsMediationAdColony" version="3.1.2.0">
17+
<sources>
18+
<source>https://github.com/CocoaPods/Specs</source>
19+
</sources>
20+
</iosPod>
21+
</iosPods>
22+
</dependencies>
23+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.google.unity.mediation.vungle">
4+
5+
<!-- For optimal performance, AdColony recommends adding the following OPTIONAL permission -->
6+
<!-- <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> -->
7+
<!-- For optimal performance, AdColony recommends adding the following OPTIONAL permission -->
8+
<!-- <uses-permission android:name="android.permission.VIBRATE" /> -->
9+
10+
<application>
11+
<activity
12+
android:name="com.adcolony.sdk.AdColonyInterstitialActivity"
13+
android:configChanges="keyboardHidden|orientation|screenSize"
14+
android:hardwareAccelerated="true" />
15+
16+
<activity
17+
android:name="com.adcolony.sdk.AdColonyAdViewActivity"
18+
android:configChanges="keyboardHidden|orientation|screenSize"
19+
android:hardwareAccelerated="true" />
20+
</application>
21+
22+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target=android-19
2+
android.library=true

mediation/AppLovin/build.gradle

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Gradle file to build a Unity package to add AppLovin mediation support to the Google Mobile Ads Unity plugin.
3+
* Usage: ./gradlew exportPackage
4+
*/
5+
6+
defaultTasks 'exportPackage'
7+
8+
// Project level variables.
9+
project.ext {
10+
unity_exe = System.getProperty("UNITY_EXE")
11+
if (unity_exe == null || unity_exe.isEmpty()) {
12+
unity_exe = System.getenv("UNITY_EXE")
13+
}
14+
if (unity_exe == null || unity_exe.isEmpty()) {
15+
unity_exe = '/Applications/Unity/Unity.app/Contents/MacOS/Unity'
16+
}
17+
18+
if (!file(unity_exe).exists()) {
19+
throw new GradleException('Unable to locate installation of Unity. Please create a ' +
20+
'UNITY_EXE environment variable and point it to your Unity installation.')
21+
}
22+
23+
pluginSource = file('source/plugin').absolutePath
24+
pluginBuildDir = file('temp/plugin-build-dir').absolutePath
25+
buildPath = file('temp').absolutePath
26+
exportPath = file('GoogleMobileAdsAppLovinMediation.unitypackage').absolutePath
27+
}
28+
29+
// Build unity package using through command line interface.
30+
// Create new unity project with files in temporary build directory and export files to a unity package.
31+
// Command line usage and arguments documented at http://docs.unity3d.com/Manual/CommandLineArguments.html.
32+
task exportPackage(type: Exec) {
33+
description = "Creates and exports the Plugin unity package"
34+
executable "${unity_exe}"
35+
args "-g.building",
36+
"-batchmode",
37+
"-projectPath", "${pluginBuildDir}",
38+
"-logFile", "temp/unity.log",
39+
"-exportPackage",
40+
"Assets/GoogleMobileAds/Editor",
41+
"Assets/Plugins",
42+
"${exportPath}",
43+
"-quit"
44+
45+
ignoreExitValue true
46+
47+
doLast {
48+
if (execResult.getExitValue() != 0) {
49+
copy {
50+
from "temp/"
51+
into "./"
52+
include "unity.log"
53+
}
54+
}
55+
}
56+
}
57+
58+
task createTempBuildFolder(type: Copy) {
59+
from { "${pluginSource}" }
60+
into { "${pluginBuildDir}" }
61+
}
62+
63+
task clearTempBuildFolder(type: Delete) {
64+
delete { "${buildPath}" }
65+
}
66+
67+
exportPackage.dependsOn(createTempBuildFolder)
68+
exportPackage.finalizedBy(clearTempBuildFolder)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<dependencies>
2+
<androidPackages>
3+
<androidPackage spec="com.google.ads.mediation:applovin:7.4.1.1">
4+
</androidPackage>
5+
<androidPackage spec="com.applovin:applovin-sdk:7.4.1">
6+
</androidPackage>
7+
</androidPackages>
8+
9+
<iosPods>
10+
<iosPod name="GoogleMobileAdsMediationAppLovin" version="4.4.1.1">
11+
<sources>
12+
<source>https://github.com/CocoaPods/Specs</source>
13+
</sources>
14+
</iosPod>
15+
</iosPods>
16+
</dependencies>
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.google.unity.mediation.AppLovin">
4+
5+
<application>
6+
7+
<!--<meta-data-->
8+
<!--android:name="applovin.sdk.key"-->
9+
<!--android:value="INSERT_APP_LOVIN_SDK_KEY_HERE" />-->
10+
11+
<activity
12+
android:name="com.applovin.adview.AppLovinInterstitialActivity"
13+
android:configChanges="orientation|screenSize" />
14+
15+
<activity
16+
android:name="com.applovin.adview.AppLovinConfirmationActivity"
17+
android:configChanges="orientation|screenSize" />
18+
</application>
19+
20+
</manifest>
21+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
target=android-19
2+
android.library=true

mediation/Vungle/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/*
2-
/*
32
* Gradle file to build a Unity package to add Vungle mediation support to the Google Mobile Ads Unity plugin.
43
* Usage: ./gradlew exportPackage
54
*/
@@ -17,7 +16,7 @@ project.ext {
1716
}
1817

1918
if (!file(unity_exe).exists()) {
20-
throw new GradleException('Unable to locate installation of Unity. Please create a' +
19+
throw new GradleException('Unable to locate installation of Unity. Please create a ' +
2120
'UNITY_EXE environment variable and point it to your Unity installation.')
2221
}
2322

@@ -29,13 +28,13 @@ project.ext {
2928

3029
// Build jar from android plugin source files using existing Gradle build file.
3130
task buildAndroidPluginJar(type: GradleBuild) {
32-
buildFile = 'source/android-library/app/build.gradle'
31+
buildFile = 'source/android-library/vungle/build.gradle'
3332
tasks = ['build']
3433
}
3534

3635
// Move android plugin jar to temporary build directory.
3736
task copyAndroidLibraryJar(type: Copy) {
38-
from("source/android-library/app/build/intermediates/bundles/release/")
37+
from("source/android-library/vungle/build/intermediates/bundles/release/")
3938
into("${pluginBuildDir}/Assets/Plugins/Android/")
4039
include('classes.jar')
4140
rename('classes.jar', 'vungle-extras-library.jar')

0 commit comments

Comments
 (0)