-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version 3.1.0 of the Google Mobile Ads Unity Plugin
- Loading branch information
Ram Parameswaran
committed
Oct 8, 2016
1 parent
244d4bb
commit add3cfc
Showing
39 changed files
with
147 additions
and
2,992 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
source/android-library/gradle/wrapper/gradle-wrapper.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#Fri Dec 18 19:33:03 EST 2015 | ||
#Fri Sep 30 15:07:15 PDT 2016 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
88 changes: 88 additions & 0 deletions
88
source/plugin/Assets/GoogleMobileAds/Editor/AdMobDependencies.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// Copyright (C) 2016 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.Collections.Generic; | ||
using UnityEditor; | ||
|
||
/// AdMob dependencies file. | ||
[InitializeOnLoad] | ||
public class AdMobDependencies : AssetPostprocessor | ||
{ | ||
/// Initializes static members of the class. | ||
static AdMobDependencies() { SetupDeps(); } | ||
|
||
static void SetupDeps() { | ||
#if UNITY_ANDROID | ||
// Setup the resolver using reflection as the module may not be | ||
// available at compile time. | ||
Type playServicesSupport = Google.VersionHandler.FindClass( | ||
"Google.JarResolver", "Google.JarResolver.PlayServicesSupport"); | ||
if (playServicesSupport == null) { | ||
return; | ||
} | ||
object svcSupport = Google.VersionHandler.InvokeStaticMethod( | ||
playServicesSupport, "CreateInstance", | ||
new object[] { | ||
"AdMobUnity", | ||
EditorPrefs.GetString("AndroidSdkRoot"), | ||
"ProjectSettings" | ||
}); | ||
|
||
Google.VersionHandler.InvokeInstanceMethod( | ||
svcSupport, "DependOn", | ||
new object[] { "com.google.android.gms", "play-services-ads", | ||
"LATEST" }, | ||
namedArgs: new Dictionary<string, object>() { | ||
{"packageIds", new string[] { | ||
"extra-google-m2repository", | ||
"extra-android-m2repository"} } | ||
}); | ||
|
||
// Marshmallow permissions requires app-compat. | ||
Google.VersionHandler.InvokeInstanceMethod( | ||
svcSupport, "DependOn", | ||
new object[] { "com.android.support", "appcompat-v7", "23.1.0+" }, | ||
namedArgs: new Dictionary<string, object>() { | ||
{"packageIds", new string[] { "extra-android-m2repository" }}, | ||
}); | ||
#elif UNITY_IOS | ||
Type iosResolver = Google.VersionHandler.FindClass( | ||
"Google.IOSResolver", "Google.IOSResolver"); | ||
if (iosResolver == null) { | ||
return; | ||
} | ||
Google.VersionHandler.InvokeStaticMethod( | ||
iosResolver, "AddPod", | ||
new object[] { "Google-Mobile-Ads-SDK" }, | ||
namedArgs: new Dictionary<string, object>() { | ||
{ "version", "7.8+" } | ||
}); | ||
#endif // UNITY_IOS | ||
} | ||
|
||
// Handle delayed loading of the dependency resolvers. | ||
private static void OnPostprocessAllAssets( | ||
string[] importedAssets, string[] deletedAssets, | ||
string[] movedAssets, string[] movedFromPath) { | ||
foreach (string asset in importedAssets) { | ||
if (asset.Contains("IOSResolver") || | ||
asset.Contains("JarResolver")) { | ||
SetupDeps(); | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
|
File renamed without changes.
84 changes: 0 additions & 84 deletions
84
source/plugin/Assets/GoogleMobileAds/Editor/CocoaPodHelper.cs
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
source/plugin/Assets/GoogleMobileAds/Editor/CocoaPodHelper.cs.meta
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.