com.amanotes.gdk 0.2.81 → 0.2.82-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Editor/Extra/SDKVersionTracking.cs +9 -1
- package/Editor/Utils/AmaGDKEditor.ExtractVersion.Max.cs +113 -0
- package/Editor/Utils/AmaGDKEditor.ExtractVersion.Max.cs.meta +3 -0
- package/Editor/Utils/AmaGDKEditor.ExtractVersion.cs +8 -10
- package/Extra/AmaGDKInstaller.unitypackage +0 -0
- package/Extra/AutoEventQC.unitypackage +0 -0
- package/Extra/CheckDiskSpace.unitypackage +0 -0
- package/Extra/Consent.unitypackage +0 -0
- package/Extra/CrashlyticHook.unitypackage +0 -0
- package/Extra/ForceUpdate.unitypackage +0 -0
- package/Extra/LegacyGDKUpdateHelper.unitypackage +0 -0
- package/Extra/PostProcessor.unitypackage +0 -0
- package/Packages/AmaGDKConfig.unitypackage +0 -0
- package/Packages/AmaGDKExample.unitypackage +0 -0
- package/Packages/AmaGDKTest.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.PurchaseConnector.unitypackage +0 -0
- package/Packages/AppsFlyerAdapter.unitypackage +0 -0
- package/Packages/FirebaseAnalyticsAdapter.unitypackage +0 -0
- package/Packages/FirebaseRemoteConfigAdapter.unitypackage +0 -0
- package/Packages/IronSourceAdapter.AdQuality.unitypackage +0 -0
- package/Packages/IronSourceAdapter.unitypackage +0 -0
- package/Packages/MaxAdNetworkAdapter.unitypackage +0 -0
- package/Packages/RevenueCatAdapter.unitypackage +0 -0
- package/Packages/SqliteAnalyticsAdapter.unitypackage +0 -0
- package/Runtime/AmaGDK.cs +1 -1
- package/package.json +1 -1
|
@@ -251,6 +251,11 @@ namespace Amanotes.Editor
|
|
|
251
251
|
|
|
252
252
|
public int callbackOrder { get; }
|
|
253
253
|
public void OnPreprocessBuild(BuildReport report)
|
|
254
|
+
{
|
|
255
|
+
OnPreprocessBuild();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
public void OnPreprocessBuild()
|
|
254
259
|
{
|
|
255
260
|
_dicThirdPartyVersion = AmaGDKExtra.GetThirdPartyVersions();
|
|
256
261
|
_dicImportedGDKAdapter = GetImportedGDKAdapter();
|
|
@@ -269,10 +274,13 @@ namespace Amanotes.Editor
|
|
|
269
274
|
[PostProcessBuild(999)]
|
|
270
275
|
public static void OnPostProcessBuild(BuildTarget target, string pathToBuiltProject)
|
|
271
276
|
{
|
|
277
|
+
var maxAdapters = MaxEditorUtils.GetMaxAdapters().ToDictionary(kvp => $"{kvp.Key}-MaxAdapter", kvp => (object)kvp.Value);
|
|
278
|
+
var ironSourceAdapters = _dicIronSourceAdapterVersion.ToDictionary(kvp => $"{kvp.Key}-ISAdapter", kvp => kvp.Value);
|
|
272
279
|
var rawData = _dicThirdPartyVersion
|
|
273
280
|
.Concat(_dicExtraVersion)
|
|
274
|
-
.Concat(_dicIronSourceAdapterVersion.ToDictionary(kvp => kvp.Key, kvp => (object)("IS_" + kvp.Value)))
|
|
275
281
|
.ToDictionary(x => x.Key, x => x.Value);
|
|
282
|
+
rawData["MaxAdapters"] = maxAdapters;
|
|
283
|
+
rawData["IronSourceAdapters"] = ironSourceAdapters;
|
|
276
284
|
rawData["UnityVersion"] = Application.unityVersion;
|
|
277
285
|
string platform = "";
|
|
278
286
|
#if UNITY_ANDROID
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
using System.Collections.Generic;
|
|
2
|
+
using System.IO;
|
|
3
|
+
using System.Linq;
|
|
4
|
+
using System.Xml.Linq;
|
|
5
|
+
|
|
6
|
+
namespace Amanotes.Editor
|
|
7
|
+
{
|
|
8
|
+
public class Versions
|
|
9
|
+
{
|
|
10
|
+
public string Unity;
|
|
11
|
+
public string Android;
|
|
12
|
+
public string Ios;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public class MaxEditorUtils
|
|
16
|
+
{
|
|
17
|
+
public static Dictionary<string, string> GetMaxAdapters()
|
|
18
|
+
{
|
|
19
|
+
var result = new Dictionary<string, string>();
|
|
20
|
+
string mediationPath = "Assets/MaxSdk/Mediation";
|
|
21
|
+
string[] adapterFolders = Directory.GetDirectories(mediationPath);
|
|
22
|
+
|
|
23
|
+
foreach (string adapterFolder in adapterFolders)
|
|
24
|
+
{
|
|
25
|
+
string adapterName = new DirectoryInfo(adapterFolder).Name;
|
|
26
|
+
string dependencyPath = Path.Combine(adapterFolder, "Editor/Dependencies.xml");
|
|
27
|
+
Versions version = GetCurrentVersions(dependencyPath);
|
|
28
|
+
result.Add(adapterName, $"android_{version.Android}_ios_{version.Ios}");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return result;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
public static Versions GetCurrentVersions(string dependencyPath)
|
|
35
|
+
{
|
|
36
|
+
XDocument dependency;
|
|
37
|
+
try
|
|
38
|
+
{
|
|
39
|
+
dependency = XDocument.Load(dependencyPath);
|
|
40
|
+
}
|
|
41
|
+
#pragma warning disable 0168
|
|
42
|
+
catch (IOException exception)
|
|
43
|
+
#pragma warning restore 0168
|
|
44
|
+
{
|
|
45
|
+
// Couldn't find the dependencies file. The plugin is not installed.
|
|
46
|
+
return new Versions();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// <dependencies>
|
|
50
|
+
// <androidPackages>
|
|
51
|
+
// <androidPackage spec="com.applovin.mediation:network_name-adapter:1.2.3.4" />
|
|
52
|
+
// </androidPackages>
|
|
53
|
+
// <iosPods>
|
|
54
|
+
// <iosPod name="AppLovinMediationNetworkNameAdapter" version="2.3.4.5" />
|
|
55
|
+
// </iosPods>
|
|
56
|
+
// </dependencies>
|
|
57
|
+
string androidVersion = null;
|
|
58
|
+
string iosVersion = null;
|
|
59
|
+
var dependenciesElement = dependency.Element("dependencies");
|
|
60
|
+
if (dependenciesElement != null)
|
|
61
|
+
{
|
|
62
|
+
var androidPackages = dependenciesElement.Element("androidPackages");
|
|
63
|
+
if (androidPackages != null)
|
|
64
|
+
{
|
|
65
|
+
var adapterPackage = androidPackages.Descendants().FirstOrDefault(element => element.Name.LocalName.Equals("androidPackage")
|
|
66
|
+
&& element.FirstAttribute.Name.LocalName.Equals("spec")
|
|
67
|
+
&& element.FirstAttribute.Value.StartsWith("com.applovin"));
|
|
68
|
+
if (adapterPackage != null)
|
|
69
|
+
{
|
|
70
|
+
androidVersion = adapterPackage.FirstAttribute.Value.Split(':').Last();
|
|
71
|
+
// Hack alert: Some Android versions might have square brackets to force a specific version. Remove them if they are detected.
|
|
72
|
+
if (androidVersion.StartsWith("["))
|
|
73
|
+
{
|
|
74
|
+
androidVersion = androidVersion.Trim('[', ']');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
var iosPods = dependenciesElement.Element("iosPods");
|
|
80
|
+
if (iosPods != null)
|
|
81
|
+
{
|
|
82
|
+
var adapterPod = iosPods.Descendants().FirstOrDefault(element => element.Name.LocalName.Equals("iosPod")
|
|
83
|
+
&& element.FirstAttribute.Name.LocalName.Equals("name")
|
|
84
|
+
&& element.FirstAttribute.Value.StartsWith("AppLovin"));
|
|
85
|
+
if (adapterPod != null)
|
|
86
|
+
{
|
|
87
|
+
iosVersion = adapterPod.Attributes().First(attribute => attribute.Name.LocalName.Equals("version")).Value;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
var currentVersions = new Versions();
|
|
93
|
+
if (androidVersion != null && iosVersion != null)
|
|
94
|
+
{
|
|
95
|
+
currentVersions.Unity = string.Format("android_{0}_ios_{1}", androidVersion, iosVersion);
|
|
96
|
+
currentVersions.Android = androidVersion;
|
|
97
|
+
currentVersions.Ios = iosVersion;
|
|
98
|
+
}
|
|
99
|
+
else if (androidVersion != null)
|
|
100
|
+
{
|
|
101
|
+
currentVersions.Unity = string.Format("android_{0}", androidVersion);
|
|
102
|
+
currentVersions.Android = androidVersion;
|
|
103
|
+
}
|
|
104
|
+
else if (iosVersion != null)
|
|
105
|
+
{
|
|
106
|
+
currentVersions.Unity = string.Format("ios_{0}", iosVersion);
|
|
107
|
+
currentVersions.Ios = iosVersion;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return currentVersions;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
@@ -361,20 +361,18 @@ namespace Amanotes.Editor
|
|
|
361
361
|
internal static List<IronSourceSDKAdapter> IronSourceAdapter()
|
|
362
362
|
{
|
|
363
363
|
var listAdapter = new List<IronSourceSDKAdapter>();
|
|
364
|
-
const string
|
|
364
|
+
const string IRON_SOURCE_PATH = "Assets/IronSource";
|
|
365
|
+
const string LEVEL_PLAY_PATH = "Assets/LevelPlay";
|
|
365
366
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
string[] filesIRadapter = Directory.GetFiles(IRONSOURCE_PATH, "IS*AdapterDependencies.xml", SearchOption.AllDirectories);
|
|
367
|
+
var irsFiles = Directory.Exists(IRON_SOURCE_PATH) ? Directory.GetFiles(IRON_SOURCE_PATH, "IS*AdapterDependencies.xml", SearchOption.AllDirectories).ToList() : new List<string>();
|
|
368
|
+
var levelPlayFiles = Directory.Exists(LEVEL_PLAY_PATH) ? Directory.GetFiles(LEVEL_PLAY_PATH, "IS*AdapterDependencies.xml", SearchOption.AllDirectories).ToList() : new List<string>();
|
|
369
|
+
|
|
370
|
+
var adapterFiles = irsFiles.Concat(levelPlayFiles).ToList();
|
|
372
371
|
|
|
373
|
-
if (
|
|
374
|
-
|
|
372
|
+
if (adapterFiles.Count <= 0) return listAdapter;
|
|
373
|
+
foreach (string filePath in adapterFiles)
|
|
375
374
|
{
|
|
376
375
|
var Xdoc = new XmlDocument();
|
|
377
|
-
string filePath = filesIRadapter[i];
|
|
378
376
|
|
|
379
377
|
Xdoc.Load(filePath);
|
|
380
378
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/Runtime/AmaGDK.cs
CHANGED
|
@@ -27,7 +27,7 @@ namespace Amanotes.Core
|
|
|
27
27
|
{
|
|
28
28
|
public partial class AmaGDK : MonoBehaviour
|
|
29
29
|
{
|
|
30
|
-
public const string VERSION = "0.2.
|
|
30
|
+
public const string VERSION = "0.2.82-alpha.1";
|
|
31
31
|
|
|
32
32
|
internal static Status _status = Status.None;
|
|
33
33
|
internal static ConfigAsset _config = null;
|