Skip to content

Commit

Permalink
Version 3.10.0 of the Google Mobile Ads Unity plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
rampara committed Dec 18, 2017
1 parent 1288634 commit e393e68
Show file tree
Hide file tree
Showing 71 changed files with 1,727 additions and 67 deletions.
25 changes: 25 additions & 0 deletions ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
Google Mobile Ads Unity Plugin Change Log

**************
Version 3.10.0
**************

Plugin:
- Updated Smart Banner positioning to render within safe area on iOS 11.
- Added API to return height and width of BannerView in pixels.
- Added SetPosition method to reposition banner ads.
- Updated AppLovin Unity mediation package to support AppLovin initialization
integration.

Mediation packages:
- Added InMobi mediation support package.
- Added Tapjoy mediation support package.
- Added Unity Ads mediation support package.
- Added myTarget mediation support package.

Built and tested with:
- Google Play services 11.6.2
- Google Mobile Ads iOS SDK 7.27.0
- Unity Jar Resolver 1.2.59.0

*************
Version 3.9.0
*************

Plugin:
- Implemented workaround for issue where ad views are rendered in incorrect
position.
- Resolved compatibility issues with Gradle 4.
- Resovled comnpatilbity issues with older versions of Xcode.

Mediation packages:
- Added API for video ad volume control.
- Added AdColony mediation support package.
- Added AppLovin mediation support package.
Expand Down
3 changes: 2 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ project.ext {

pluginSource = file('source/plugin').absolutePath
pluginBuildDir = file('temp/plugin-build-dir').absolutePath
buildPath = file('temp').absolutePath
exportPath = file('GoogleMobileAds.unitypackage').absolutePath

buildPath = file('temp').absolutePath
resolverDir = file("${buildPath}/jarresolver").absolutePath
}

Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Jul 12 16:58:21 PDT 2017
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
8 changes: 8 additions & 0 deletions mediation/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.gradle
/local.properties
/.idea/workspace.xml
/.idea/libraries
.idea
.DS_Store
/build
*.iml
7 changes: 7 additions & 0 deletions mediation/AppLovin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AppLovin Adapter plugin for Google Mobile Ads SDK for Unity 3D Changelog

## 1.0.0

- First release!
- Supports Android adapter version 7.4.1.1.
- Supports iOS adapter version 4.4.1.1.
5 changes: 5 additions & 0 deletions mediation/AppLovin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# AppLovin Adapter plugin for Google Mobile Ads SDK for Unity 3D

This is a plugin to be used in conjunction with the Google Mobile Ads SDK in
Google Play services. For requirements, instructions, and other info, see the
[AppLovin Adapter Integration Guide](https://developers.google.com/admob/unity/mediation/applovin).
81 changes: 79 additions & 2 deletions mediation/AppLovin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
* Gradle file to build a Unity package to add AppLovin mediation support to the Google Mobile Ads Unity plugin.
* Usage: ./gradlew exportPackage
*/
plugins {
id "com.jfrog.bintray" version "1.7.3"
}

defaultTasks 'exportPackage'

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

versionString = '1.0.0'
pluginName = 'GoogleMobileAdsAppLovinMediation'
pluginFileName = "${pluginName}.unitypackage"
zipName = "${pluginName}-${versionString}"
zipFileName = "${zipName}.zip"
pluginSource = file('source/plugin').absolutePath
pluginBuildDir = file('temp/plugin-build-dir').absolutePath
buildPath = file('temp').absolutePath
exportPath = file('GoogleMobileAdsAppLovinMediation.unitypackage').absolutePath
exportPath = file(pluginFileName).absolutePath
}

// Build unity package using through command line interface.
Expand All @@ -37,7 +45,7 @@ task exportPackage(type: Exec) {
"-projectPath", "${pluginBuildDir}",
"-logFile", "temp/unity.log",
"-exportPackage",
"Assets/GoogleMobileAds/Editor",
"Assets/GoogleMobileAds",
"Assets/Plugins",
"${exportPath}",
"-quit"
Expand Down Expand Up @@ -66,3 +74,72 @@ task clearTempBuildFolder(type: Delete) {

exportPackage.dependsOn(createTempBuildFolder)
exportPackage.finalizedBy(clearTempBuildFolder)

/**
* Delete task to delete any previously generated .zip files by makeZip task.
* makeZip depends on this task.
*/
task clearZip(type: Delete) {
// Targets to be deleted.
delete(zipFileName)
}

/**
* Zip task to make a zip archive. This task depends on exportPackage and clearZip tasks.
*/
task makeZip(type: Zip) {
// Targets to be added to the zip archive.
from("./${pluginFileName}", "./README.md", "./CHANGELOG.md")
// Root directory name for the zip archive.
into(zipName)
// Name of the zip archive.
archiveName zipFileName
// Destination directory in which the archive needs to be saved.
destinationDir file('.')
}

makeZip.dependsOn([clearZip, exportPackage])
makeZip.mustRunAfter([clearZip, exportPackage])

/**
* Bintray closure needed to run the bintrayUpload task.
*
* Usage:
* ./gradlew bintrayUpload -PbintrayUser=YOUR_BINTRAY_USER_ID -PbintrayApiKey=YOUR_BINTRAY_API_KEY
*
* The Bintray User ID and API key can be added to your system environment variables as BINTRAY_USER
* and BINTRAY_API_KEY respectively, and the command can be reduced to:
* ./gradlew bintrayUpload
*/
bintray {
user = project.hasProperty('bintrayUser') ? project.property('bintrayUser')
: System.getenv('BINTRAY_USER')
key = project.hasProperty('bintrayApiKey') ? project.property('bintrayApiKey')
: System.getenv('BINTRAY_API_KEY')

filesSpec { // 'filesSpec' is a standard Gradle CopySpec
from zipFileName
into "${pluginName}/${versionString}"
}
dryRun = false // Deploy after running.
publish = false // Don't auto publish after deploying.
override = false // Don't override existing version artifacts that are already published.

pkg {
repo = 'mobile-ads-adapters-unity'
name = pluginName
userOrg = 'google'
desc = 'AppLovin plugin for Google Mobile Ads Mediation.'
websiteUrl = 'https://developers.google.com/admob/unity/mediation/applovin'
issueTrackerUrl = 'https://github.com/googleads/googleads-mobile-unity/issues'
vcsUrl = 'https://github.com/googleads/googleads-mobile-unity'
licenses = ['Apache-2.0']

version {
name = versionString
}
}
}

bintrayUpload.dependsOn(makeZip)
bintrayUpload.mustRunAfter(makeZip)
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright (C) 2017 Google, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;

using GoogleMobileAds.Common.Mediation.AppLovin;
using GoogleMobileAds.Mediation;

namespace GoogleMobileAds.Api.Mediation.AppLovin
{
public class AppLovin
{
private static readonly IAppLovinClient client = GetAppLovinClient();

public static void Initialize()
{
client.Initialize();
}

private static IAppLovinClient GetAppLovinClient()
{
return AppLovinClientFactory.AppLovinInstance();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Copyright (C) 2017 Google, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using System;
using System.Reflection;

using UnityEngine;

namespace GoogleMobileAds.Common.Mediation.AppLovin
{
public class DummyClient : IAppLovinClient
{
public DummyClient()
{
Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
}

public void Initialize()
{
Debug.Log("Dummy " + MethodBase.GetCurrentMethod().Name);
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright (C) 2017 Google, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using UnityEngine;
using System.Collections;

namespace GoogleMobileAds.Common.Mediation.AppLovin
{
public interface IAppLovinClient
{
// Initialize the AppLovin SDK.
void Initialize();
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright (C) 2017 Google, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using System.IO;

namespace GoogleMobileAds.Common.Mediation.AppLovin
{
public class AppLovinPostProcessBuild
{
[PostProcessBuild]
public static void ChangeXcodePlist(BuildTarget buildTarget,
string pathToBuiltProject)
{
if (buildTarget == BuildTarget.iOS)
{
string plistPath = pathToBuiltProject + "/Info.plist";
PlistDocument plist = new PlistDocument();
plist.ReadFromString(File.ReadAllText(plistPath));

PlistElementDict rootDict = plist.root;

rootDict.SetString("AppLovinSdkKey",
"INSERT_APP_LOVIN_SDK_KEY_HERE");
File.WriteAllText(plistPath, plist.WriteToString());
}
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e393e68

Please sign in to comment.