Skip to content

Commit e393e68

Browse files
committed
Version 3.10.0 of the Google Mobile Ads Unity plugin
1 parent 1288634 commit e393e68

File tree

71 files changed

+1727
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1727
-67
lines changed

ChangeLog.txt

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

3+
**************
4+
Version 3.10.0
5+
**************
6+
7+
Plugin:
8+
- Updated Smart Banner positioning to render within safe area on iOS 11.
9+
- Added API to return height and width of BannerView in pixels.
10+
- Added SetPosition method to reposition banner ads.
11+
- Updated AppLovin Unity mediation package to support AppLovin initialization
12+
integration.
13+
14+
Mediation packages:
15+
- Added InMobi mediation support package.
16+
- Added Tapjoy mediation support package.
17+
- Added Unity Ads mediation support package.
18+
- Added myTarget mediation support package.
19+
20+
Built and tested with:
21+
- Google Play services 11.6.2
22+
- Google Mobile Ads iOS SDK 7.27.0
23+
- Unity Jar Resolver 1.2.59.0
24+
325
*************
426
Version 3.9.0
527
*************
628

29+
Plugin:
730
- Implemented workaround for issue where ad views are rendered in incorrect
831
position.
932
- Resolved compatibility issues with Gradle 4.
1033
- Resovled comnpatilbity issues with older versions of Xcode.
34+
35+
Mediation packages:
1136
- Added API for video ad volume control.
1237
- Added AdColony mediation support package.
1338
- Added AppLovin mediation support package.

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ project.ext {
3131

3232
pluginSource = file('source/plugin').absolutePath
3333
pluginBuildDir = file('temp/plugin-build-dir').absolutePath
34-
buildPath = file('temp').absolutePath
3534
exportPath = file('GoogleMobileAds.unitypackage').absolutePath
35+
36+
buildPath = file('temp').absolutePath
3637
resolverDir = file("${buildPath}/jarresolver").absolutePath
3738
}
3839

gradle/wrapper/gradle-wrapper.jar

-4 Bytes
Binary file not shown.
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Wed Jul 12 16:58:21 PDT 2017
1+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
zipStoreBase=GRADLE_USER_HOME
54
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME

mediation/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.gradle
2+
/local.properties
3+
/.idea/workspace.xml
4+
/.idea/libraries
5+
.idea
6+
.DS_Store
7+
/build
8+
*.iml

mediation/AppLovin/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# AppLovin Adapter plugin for Google Mobile Ads SDK for Unity 3D Changelog
2+
3+
## 1.0.0
4+
5+
- First release!
6+
- Supports Android adapter version 7.4.1.1.
7+
- Supports iOS adapter version 4.4.1.1.

mediation/AppLovin/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AppLovin Adapter plugin for Google Mobile Ads SDK for Unity 3D
2+
3+
This is a plugin to be used in conjunction with the Google Mobile Ads SDK in
4+
Google Play services. For requirements, instructions, and other info, see the
5+
[AppLovin Adapter Integration Guide](https://developers.google.com/admob/unity/mediation/applovin).

mediation/AppLovin/build.gradle

Lines changed: 79 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* Gradle file to build a Unity package to add AppLovin mediation support to the Google Mobile Ads Unity plugin.
33
* Usage: ./gradlew exportPackage
44
*/
5+
plugins {
6+
id "com.jfrog.bintray" version "1.7.3"
7+
}
58

69
defaultTasks 'exportPackage'
710

@@ -20,10 +23,15 @@ project.ext {
2023
'UNITY_EXE environment variable and point it to your Unity installation.')
2124
}
2225

26+
versionString = '1.0.0'
27+
pluginName = 'GoogleMobileAdsAppLovinMediation'
28+
pluginFileName = "${pluginName}.unitypackage"
29+
zipName = "${pluginName}-${versionString}"
30+
zipFileName = "${zipName}.zip"
2331
pluginSource = file('source/plugin').absolutePath
2432
pluginBuildDir = file('temp/plugin-build-dir').absolutePath
2533
buildPath = file('temp').absolutePath
26-
exportPath = file('GoogleMobileAdsAppLovinMediation.unitypackage').absolutePath
34+
exportPath = file(pluginFileName).absolutePath
2735
}
2836

2937
// Build unity package using through command line interface.
@@ -37,7 +45,7 @@ task exportPackage(type: Exec) {
3745
"-projectPath", "${pluginBuildDir}",
3846
"-logFile", "temp/unity.log",
3947
"-exportPackage",
40-
"Assets/GoogleMobileAds/Editor",
48+
"Assets/GoogleMobileAds",
4149
"Assets/Plugins",
4250
"${exportPath}",
4351
"-quit"
@@ -66,3 +74,72 @@ task clearTempBuildFolder(type: Delete) {
6674

6775
exportPackage.dependsOn(createTempBuildFolder)
6876
exportPackage.finalizedBy(clearTempBuildFolder)
77+
78+
/**
79+
* Delete task to delete any previously generated .zip files by makeZip task.
80+
* makeZip depends on this task.
81+
*/
82+
task clearZip(type: Delete) {
83+
// Targets to be deleted.
84+
delete(zipFileName)
85+
}
86+
87+
/**
88+
* Zip task to make a zip archive. This task depends on exportPackage and clearZip tasks.
89+
*/
90+
task makeZip(type: Zip) {
91+
// Targets to be added to the zip archive.
92+
from("./${pluginFileName}", "./README.md", "./CHANGELOG.md")
93+
// Root directory name for the zip archive.
94+
into(zipName)
95+
// Name of the zip archive.
96+
archiveName zipFileName
97+
// Destination directory in which the archive needs to be saved.
98+
destinationDir file('.')
99+
}
100+
101+
makeZip.dependsOn([clearZip, exportPackage])
102+
makeZip.mustRunAfter([clearZip, exportPackage])
103+
104+
/**
105+
* Bintray closure needed to run the bintrayUpload task.
106+
*
107+
* Usage:
108+
* ./gradlew bintrayUpload -PbintrayUser=YOUR_BINTRAY_USER_ID -PbintrayApiKey=YOUR_BINTRAY_API_KEY
109+
*
110+
* The Bintray User ID and API key can be added to your system environment variables as BINTRAY_USER
111+
* and BINTRAY_API_KEY respectively, and the command can be reduced to:
112+
* ./gradlew bintrayUpload
113+
*/
114+
bintray {
115+
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser')
116+
: System.getenv('BINTRAY_USER')
117+
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey')
118+
: System.getenv('BINTRAY_API_KEY')
119+
120+
filesSpec { // 'filesSpec' is a standard Gradle CopySpec
121+
from zipFileName
122+
into "${pluginName}/${versionString}"
123+
}
124+
dryRun = false // Deploy after running.
125+
publish = false // Don't auto publish after deploying.
126+
override = false // Don't override existing version artifacts that are already published.
127+
128+
pkg {
129+
repo = 'mobile-ads-adapters-unity'
130+
name = pluginName
131+
userOrg = 'google'
132+
desc = 'AppLovin plugin for Google Mobile Ads Mediation.'
133+
websiteUrl = 'https://developers.google.com/admob/unity/mediation/applovin'
134+
issueTrackerUrl = 'https://github.com/googleads/googleads-mobile-unity/issues'
135+
vcsUrl = 'https://github.com/googleads/googleads-mobile-unity'
136+
licenses = ['Apache-2.0']
137+
138+
version {
139+
name = versionString
140+
}
141+
}
142+
}
143+
144+
bintrayUpload.dependsOn(makeZip)
145+
bintrayUpload.mustRunAfter(makeZip)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (C) 2017 Google, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
using System;
16+
17+
using GoogleMobileAds.Common.Mediation.AppLovin;
18+
using GoogleMobileAds.Mediation;
19+
20+
namespace GoogleMobileAds.Api.Mediation.AppLovin
21+
{
22+
public class AppLovin
23+
{
24+
private static readonly IAppLovinClient client = GetAppLovinClient();
25+
26+
public static void Initialize()
27+
{
28+
client.Initialize();
29+
}
30+
31+
private static IAppLovinClient GetAppLovinClient()
32+
{
33+
return AppLovinClientFactory.AppLovinInstance();
34+
}
35+
}
36+
}

mediation/AppLovin/source/plugin/Assets/GoogleMobileAds/Api/Mediation/AppLovin/AppLovin.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright (C) 2017 Google, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
using System;
16+
using System.Reflection;
17+
18+
using UnityEngine;
19+
20+
namespace GoogleMobileAds.Common.Mediation.AppLovin
21+
{
22+
public class DummyClient : IAppLovinClient
23+
{
24+
public DummyClient()
25+
{
26+
Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
27+
}
28+
29+
public void Initialize()
30+
{
31+
Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
32+
}
33+
}
34+
}
35+

mediation/AppLovin/source/plugin/Assets/GoogleMobileAds/Common/Mediation/AppLovin/DummyClient.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright (C) 2017 Google, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
using UnityEngine;
16+
using System.Collections;
17+
18+
namespace GoogleMobileAds.Common.Mediation.AppLovin
19+
{
20+
public interface IAppLovinClient
21+
{
22+
// Initialize the AppLovin SDK.
23+
void Initialize();
24+
}
25+
}

mediation/AppLovin/source/plugin/Assets/GoogleMobileAds/Common/Mediation/AppLovin/IAppLovinClient.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// Copyright (C) 2017 Google, Inc.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
using UnityEditor;
16+
using UnityEditor.Callbacks;
17+
using UnityEditor.iOS.Xcode;
18+
using System.IO;
19+
20+
namespace GoogleMobileAds.Common.Mediation.AppLovin
21+
{
22+
public class AppLovinPostProcessBuild
23+
{
24+
[PostProcessBuild]
25+
public static void ChangeXcodePlist(BuildTarget buildTarget,
26+
string pathToBuiltProject)
27+
{
28+
if (buildTarget == BuildTarget.iOS)
29+
{
30+
string plistPath = pathToBuiltProject + "/Info.plist";
31+
PlistDocument plist = new PlistDocument();
32+
plist.ReadFromString(File.ReadAllText(plistPath));
33+
34+
PlistElementDict rootDict = plist.root;
35+
36+
rootDict.SetString("AppLovinSdkKey",
37+
"INSERT_APP_LOVIN_SDK_KEY_HERE");
38+
File.WriteAllText(plistPath, plist.WriteToString());
39+
}
40+
}
41+
}
42+
}

mediation/AppLovin/source/plugin/Assets/GoogleMobileAds/Editor/AppLovinPostProcessBuild.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mediation/AppLovin/source/plugin/Assets/GoogleMobileAds/Platforms/Android/Mediation/AppLovin.meta

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)