Skip to content

Commit e55634b

Browse files
committed
Version 3.0.0 of the Google Mobile Ads Plugin
1 parent 8721179 commit e55634b

File tree

185 files changed

+4802
-1539
lines changed

Some content is hidden

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

185 files changed

+4802
-1539
lines changed

unity/ChangeLog.txt renamed to ChangeLog.txt

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

3+
*************
4+
Version 3.0.0
5+
*************
6+
- Add support for Custom In-App purchase flow on Android
7+
- Add CocoaPods integration and automated build settings for iOS projects
8+
- Use JarResolver plugin to resolve Google Play services client dependencies
9+
- Ad events for banners and interstitials refactored with new names
10+
11+
Built and tested with:
12+
- Google Play Services 8.4.0
13+
- Google Mobile Ads iOS SDK 7.6.0
14+
315
*************
416
Version 2.3.1
517
*************

README.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,35 @@
1-
Google Mobile Ads SDK Plugins
2-
=================================
3-
The Google Mobile Ads SDK is the latest generation in Google mobile advertising featuring refined ad formats and streamlined APIs for access to mobile ad networks and advertising solutions. The SDK enables mobile app developers to maximize their monetization in native mobile apps.
1+
Google Mobile Ads Unity Plugin
2+
==============================
3+
The Google Mobile Ads SDK is the latest generation in Google mobile advertising
4+
featuring refined ad formats and streamlined APIs for access to mobile ad
5+
networks and advertising solutions. The SDK enables mobile app developers to
6+
maximize their monetization in native mobile apps.
47

5-
This repository contains plugins for AdMob projects on multiple platforms.
6-
7-
Plugins
8-
-------
9-
* [Unity for iOS and Google Play services](https://github.com/googleads/googleads-mobile-plugins/tree/master/unity)
8+
This repository contains the source code for the Google Mobile Ads Unity
9+
plugin. This plugin enables Unity developers to easily serve Google Mobile Ads
10+
on Android and iOS apps without having to write Java or Objective-C code.
11+
The plugin provides a C# interface for requesting ads that is used by C#
12+
scripts in your Unity project.
1013

1114
Downloads
1215
----------
13-
Please check out our [releases](https://github.com/googleads/googleads-mobile-plugins/releases) for the latest downloads for the different sample apps.
16+
Please check out our
17+
[releases](//github.com/googleads/googleads-mobile-unity/releases)
18+
for the latest official version of the plugin.
1419

1520
Documentation
1621
--------------
17-
Check out our [developers site](https://developers.google.com/mobile-ads-sdk/) for documentation on using the SDK, and join the developer community on [our forum](https://groups.google.com/forum/#!forum/google-admob-ads-sdk).
22+
For instructions on using the plugin, please refer to
23+
[this developer guide](//developers.google.com/admob/games#unity).
24+
25+
Be sure to also join the developer community on
26+
[our forum](//groups.google.com/forum/#!categories/google-admob-ads-sdk/game-engines).
1827

1928
Suggesting improvements
2029
------------------------
21-
To file bugs, make feature requests, or to suggest other improvements, please use [github's issue tracker](https://github.com/googleads/googleads-mobile-plugins/issues).
30+
To file bugs, make feature requests, or to suggest other improvements,
31+
please use [github's issue tracker](//github.com/googleads/googleads-mobile-unity/issues).
2232

2333
License
2434
-------
2535
[Apache 2.0 License](http://www.apache.org/licenses/LICENSE-2.0.html)
26-
27-
Contributing
28-
-------------
29-
Pull requests are welcome! Please sign [this Google Code contributor agreement](https://developers.google.com/open-source/cla/individual?csw=1) before submitting.

build.gradle

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Gradle file to build the Unity plugin for the Google Mobile Ads SDK.
3+
* Useage: ./gradlew exportPackage
4+
*/
5+
6+
// Project level variables.
7+
project.ext {
8+
sdk_root = System.getProperty("ANDROID_HOME")
9+
if (sdk_root == null || sdk_root.isEmpty()) {
10+
sdk_root = System.getenv("ANDROID_HOME")
11+
}
12+
unity_exe = System.getProperty("UNITY_EXE")
13+
if (unity_exe == null || unity_exe.isEmpty()) {
14+
unity_exe = System.getenv("UNITY_EXE")
15+
}
16+
if (unity_exe == null || unity_exe.isEmpty()) {
17+
unity_exe ='/Applications/Unity/Unity.app/Contents/MacOS/Unity'
18+
}
19+
pluginSource = file('source/plugin').absolutePath
20+
pluginBuildDir = file('temp/plugin-build-dir').absolutePath
21+
buildPath = file('temp').absolutePath
22+
exportPath = file('GoogleMobileAds.unitypackage').absolutePath
23+
}
24+
25+
// Delete existing android plugin jar file.
26+
task clearJar(type: Delete) {
27+
delete 'source/android-library/app/build/intermediates/bundles/release/unity-plugin-library.jar'
28+
}
29+
30+
// Build jar from android plugin source files using existing Gradle build file.
31+
task buildAndroidPluginJar(type: GradleBuild) {
32+
buildFile = 'source/android-library/app/build.gradle'
33+
tasks = ['build']
34+
}
35+
36+
// Move android plugin jar to temporary build directory.
37+
task copyAndroidLibraryJar(type: Copy) {
38+
from("source/android-library/app/build/intermediates/bundles/release/")
39+
into("${pluginBuildDir}/Assets/Plugins/Android/GoogleMobileAdsPlugin/libs")
40+
include('classes.jar')
41+
rename('classes.jar', 'unity-plugin-library.jar')
42+
}
43+
44+
copyAndroidLibraryJar.dependsOn(clearJar, buildAndroidPluginJar)
45+
46+
// Build unity package using through command line interface.
47+
// Create new unity project with files in temporary build directory and export files within Assets/GoogleMobileAds
48+
// to a unity package.
49+
// Command line usage and arguments documented at http://docs.unity3d.com/Manual/CommandLineArguments.html.
50+
task exportPackage() {
51+
description = "Creates and exports the Plugin unity package"
52+
doLast {
53+
exec {
54+
executable "${unity_exe}"
55+
args "-g.building", "-batchmode", "-projectPath", "${pluginBuildDir}", "-logFile", "temp/unity.log", "-exportPackage", "Assets/GoogleMobileAds", "Assets/Plugins", "Assets/PlayServicesResolver", "${exportPath}", "-quit"
56+
}
57+
}
58+
}
59+
60+
task createTempBuildFolder(type: Copy) {
61+
from {"${pluginSource}"}
62+
into {"${pluginBuildDir}"}
63+
}
64+
65+
task clearTempBuildFolder(type:Delete) {
66+
delete {"${buildPath}"}
67+
}
68+
69+
exportPackage.dependsOn(createTempBuildFolder, copyAndroidLibraryJar)
70+
exportPackage.finalizedBy(clearTempBuildFolder)
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Wed Apr 10 15:27:10 PDT 2013
1+
#Fri Dec 18 19:33:24 EST 2015
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-bin.zip
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)