com.amanotes.gdk 0.2.85 → 0.2.87
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/CHANGELOG.md +30 -0
- package/Editor/Extra/GDKCIBuildCommand.cs +19 -2
- package/Editor/Extra/GDKLocalBuild.cs +25 -1
- package/Editor/Extra/SDKVersionTracking.cs +9 -1
- package/Editor/Utils/AmaGDKEditor.ExtractVersion.Max.cs +120 -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/Ad/AdLogic.cs +230 -148
- package/Runtime/AmaGDK.Adapters.cs +2 -0
- package/Runtime/AmaGDK.Analytics.cs +140 -78
- package/Runtime/AmaGDK.RemoteConfig.cs +50 -40
- package/Runtime/AmaGDK.Singleton.cs +2 -0
- package/Runtime/AmaGDK.cs +3 -1
- package/Runtime/AnalyticQualityAsset.cs +69 -38
- package/Runtime/AudioToolkit/Plugins/AudioDeviceDetector.cs +31 -17
- package/Runtime/Core/GDKDispatcher.cs +4 -2
- package/Runtime/Core/GDKSemVer.cs +23 -26
- package/Runtime/Fps/AmaFPSVisualizer.cs +48 -26
- package/Runtime/Internal/AmaGDK.Utils.cs +90 -46
- package/Runtime/Internal/ForceQuitMonitor.cs +43 -31
- package/Runtime/Klavar/Attributes/MinMaxAttribute.cs +12 -3
- package/Runtime/UI/ScrollView/GDKScrollView.cs +83 -48
- package/Runtime/Utils/GDKFileUtils.cs +3 -8
- package/Runtime/Utils/GDKUtils.cs +20 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,33 @@
|
|
|
1
|
+
## [0.2.87] - 2025-06-19
|
|
2
|
+
- [Dev] Add AI config
|
|
3
|
+
- [Dev] Improve crap score 2
|
|
4
|
+
- [Dev] Reduce complexity & crap score
|
|
5
|
+
- [Dev] Various warning fixes & Improve message verification in tests
|
|
6
|
+
- [Fix] Compiler error in Unity 2023+
|
|
7
|
+
- [Dev] Track max adapters
|
|
8
|
+
- [Fix] Do not override config when Adapter id is not available
|
|
9
|
+
- [Fix] Bypass file utils unit test
|
|
10
|
+
- [Dev] Improve verbose logging
|
|
11
|
+
- [BugFix]: Fix sentry issue : Null exception issue
|
|
12
|
+
- [Fix] Missing User Mapping in MaxAdapter
|
|
13
|
+
- [Fix] Manage ad activity killed routine
|
|
14
|
+
- [Fix] Attach JNI thread
|
|
15
|
+
- [Fix] Missing DoOnMainThread for ConsentInformation update
|
|
16
|
+
- [Fix] Send GDKVersionTracking only for Android/iOS
|
|
17
|
+
- [Dev] Rename Remote Config Data Source
|
|
18
|
+
- [Fix] Improve disk space checking with thead pool
|
|
19
|
+
- [Dev] Refactor DiskSpacePopup
|
|
20
|
+
- [Fix] Add missing scope registry for integration test
|
|
21
|
+
- [Dev] Add UniTask Dependency
|
|
22
|
+
|
|
23
|
+
## [0.2.86] - 2025-05-22
|
|
24
|
+
- [Dev] Track max adapters
|
|
25
|
+
- [Fix] Do not override config when Adapter id is not available
|
|
26
|
+
- [Fix] Bypass file utils unit test
|
|
27
|
+
- [Dev] Improve verbose logging
|
|
28
|
+
- [BugFix]: Fix sentry issue : Null exception issue
|
|
29
|
+
- [Fix] Missing User Mapping in MaxAdapter
|
|
30
|
+
|
|
1
31
|
## [0.2.85] - 2025-03-18
|
|
2
32
|
- [Fix] Manage ad activity killed routine
|
|
3
33
|
|
|
@@ -221,7 +221,11 @@ namespace Amanotes.Core
|
|
|
221
221
|
if (scriptingBackend.TryConvertToEnum(out ScriptingImplementation backend))
|
|
222
222
|
{
|
|
223
223
|
Console.WriteLine($":: Setting ScriptingBackend to {backend}");
|
|
224
|
+
#if UNITY_2023_2_OR_NEWER
|
|
225
|
+
PlayerSettings.SetScriptingBackend(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(targetGroup), backend);
|
|
226
|
+
#else
|
|
224
227
|
PlayerSettings.SetScriptingBackend(targetGroup, backend);
|
|
228
|
+
#endif
|
|
225
229
|
}
|
|
226
230
|
else
|
|
227
231
|
{
|
|
@@ -231,7 +235,11 @@ namespace Amanotes.Core
|
|
|
231
235
|
}
|
|
232
236
|
else
|
|
233
237
|
{
|
|
238
|
+
#if UNITY_2023_2_OR_NEWER
|
|
239
|
+
var defaultBackend = PlayerSettings.GetDefaultScriptingBackend(UnityEditor.Build.NamedBuildTarget.FromBuildTargetGroup(targetGroup));
|
|
240
|
+
#else
|
|
234
241
|
var defaultBackend = PlayerSettings.GetDefaultScriptingBackend(targetGroup);
|
|
242
|
+
#endif
|
|
235
243
|
Console.WriteLine($":: Using project's configured ScriptingBackend (should be {defaultBackend} for targetGroup {targetGroup}");
|
|
236
244
|
}
|
|
237
245
|
}
|
|
@@ -363,15 +371,24 @@ namespace Amanotes.Core
|
|
|
363
371
|
#if UNITY_2019_1_OR_NEWER
|
|
364
372
|
PlayerSettings.Android.useCustomKeystore = true;
|
|
365
373
|
#endif
|
|
374
|
+
|
|
375
|
+
#if UNITY_2023_2_OR_NEWER
|
|
366
376
|
PlayerSettings.Android.keystorePass = keystorePass;
|
|
377
|
+
#else
|
|
378
|
+
PlayerSettings.keystorePass = keystorePass;
|
|
379
|
+
#endif
|
|
380
|
+
|
|
367
381
|
PlayerSettings.Android.keyaliasPass = keystoreAliasPass;
|
|
368
382
|
}
|
|
369
383
|
|
|
370
384
|
private static void HandleDebugSymbols()
|
|
371
385
|
{
|
|
372
|
-
#if
|
|
386
|
+
#if UNITY_6000_0_OR_NEWER
|
|
387
|
+
UnityEditor.Android.UserBuildSettings.DebugSymbols.level = Unity.Android.Types.DebugSymbolLevel.SymbolTable;
|
|
388
|
+
#elif UNITY_2021_1_OR_NEWER
|
|
373
389
|
EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Debugging;
|
|
374
|
-
#
|
|
390
|
+
#else
|
|
391
|
+
// For Unity 2020.3 and earlier, use the legacy boolean property
|
|
375
392
|
EditorUserBuildSettings.androidCreateSymbolsZip = true;
|
|
376
393
|
#endif
|
|
377
394
|
}
|
|
@@ -327,7 +327,9 @@ namespace Amanotes.Editor
|
|
|
327
327
|
EditorUserBuildSettings.buildAppBundle = false;//isAAB;
|
|
328
328
|
EditorUserBuildSettings.exportAsGoogleAndroidProject = false;
|
|
329
329
|
|
|
330
|
-
#if
|
|
330
|
+
#if UNITY_6000_0_OR_NEWER
|
|
331
|
+
UnityEditor.Android.UserBuildSettings.DebugSymbols.level = Unity.Android.Types.DebugSymbolLevel.None;
|
|
332
|
+
#elif UNITY_2021_1_OR_NEWER
|
|
331
333
|
EditorUserBuildSettings.androidCreateSymbols = AndroidCreateSymbols.Disabled;
|
|
332
334
|
#else
|
|
333
335
|
EditorUserBuildSettings.androidCreateSymbolsZip = false;
|
|
@@ -426,13 +428,21 @@ namespace Amanotes.Editor
|
|
|
426
428
|
if (isAndroid)
|
|
427
429
|
{
|
|
428
430
|
buildNumber = PlayerSettings.Android.bundleVersionCode;
|
|
431
|
+
#if UNITY_2023_2_OR_NEWER
|
|
432
|
+
packageName = PlayerSettings.GetApplicationIdentifier(UnityEditor.Build.NamedBuildTarget.Android);
|
|
433
|
+
#else
|
|
429
434
|
packageName = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android);
|
|
435
|
+
#endif
|
|
430
436
|
}
|
|
431
437
|
|
|
432
438
|
if (isIOS)
|
|
433
439
|
{
|
|
434
440
|
int.TryParse(PlayerSettings.iOS.buildNumber, out buildNumber);
|
|
441
|
+
#if UNITY_2023_2_OR_NEWER
|
|
442
|
+
packageName = PlayerSettings.GetApplicationIdentifier(UnityEditor.Build.NamedBuildTarget.iOS);
|
|
443
|
+
#else
|
|
435
444
|
packageName = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.iOS);
|
|
445
|
+
#endif
|
|
436
446
|
}
|
|
437
447
|
|
|
438
448
|
return this;
|
|
@@ -446,13 +456,21 @@ namespace Amanotes.Editor
|
|
|
446
456
|
if (isAndroid)
|
|
447
457
|
{
|
|
448
458
|
PlayerSettings.Android.bundleVersionCode = buildNumber;
|
|
459
|
+
#if UNITY_2023_2_OR_NEWER
|
|
460
|
+
PlayerSettings.SetApplicationIdentifier(UnityEditor.Build.NamedBuildTarget.Android, packageName);
|
|
461
|
+
#else
|
|
449
462
|
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, packageName);
|
|
463
|
+
#endif
|
|
450
464
|
}
|
|
451
465
|
|
|
452
466
|
if (isIOS)
|
|
453
467
|
{
|
|
454
468
|
PlayerSettings.iOS.buildNumber = buildNumber.ToString();
|
|
469
|
+
#if UNITY_2023_2_OR_NEWER
|
|
470
|
+
PlayerSettings.SetApplicationIdentifier(UnityEditor.Build.NamedBuildTarget.iOS, packageName);
|
|
471
|
+
#else
|
|
455
472
|
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.iOS, packageName);
|
|
473
|
+
#endif
|
|
456
474
|
}
|
|
457
475
|
|
|
458
476
|
EditorApplication.RepaintProjectWindow();
|
|
@@ -486,7 +504,13 @@ namespace Amanotes.Editor
|
|
|
486
504
|
// Must use absolute path or else gradle build fail
|
|
487
505
|
var keystoreFI = new FileInfo(path);
|
|
488
506
|
PlayerSettings.Android.keystoreName = keystoreFI.FullName;
|
|
507
|
+
|
|
508
|
+
#if UNITY_2023_2_OR_NEWER
|
|
509
|
+
PlayerSettings.Android.keystorePass = keystorePassword;
|
|
510
|
+
#else
|
|
489
511
|
PlayerSettings.keystorePass = keystorePassword;
|
|
512
|
+
#endif
|
|
513
|
+
|
|
490
514
|
PlayerSettings.Android.keyaliasPass = aliasPassword;
|
|
491
515
|
PlayerSettings.Android.keyaliasName = alias;
|
|
492
516
|
}
|
|
@@ -252,6 +252,11 @@ namespace Amanotes.Editor
|
|
|
252
252
|
|
|
253
253
|
public int callbackOrder { get; }
|
|
254
254
|
public void OnPreprocessBuild(BuildReport report)
|
|
255
|
+
{
|
|
256
|
+
OnPreprocessBuild();
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
public void OnPreprocessBuild()
|
|
255
260
|
{
|
|
256
261
|
_dicThirdPartyVersion = AmaGDKExtra.GetThirdPartyVersions();
|
|
257
262
|
_dicImportedGDKAdapter = GetImportedGDKAdapter();
|
|
@@ -283,10 +288,13 @@ namespace Amanotes.Editor
|
|
|
283
288
|
return;
|
|
284
289
|
}
|
|
285
290
|
|
|
291
|
+
var maxAdapters = MaxEditorUtils.GetMaxAdapters().ToDictionary(kvp => $"{kvp.Key}-MaxAdapter", kvp => (object)kvp.Value);
|
|
292
|
+
var ironSourceAdapters = _dicIronSourceAdapterVersion.ToDictionary(kvp => $"{kvp.Key}-ISAdapter", kvp => kvp.Value);
|
|
286
293
|
var rawData = _dicThirdPartyVersion
|
|
287
294
|
.Concat(_dicExtraVersion)
|
|
288
|
-
.Concat(_dicIronSourceAdapterVersion.ToDictionary(kvp => kvp.Key, kvp => (object)("IS_" + kvp.Value)))
|
|
289
295
|
.ToDictionary(x => x.Key, x => x.Value);
|
|
296
|
+
rawData["MaxAdapters"] = maxAdapters;
|
|
297
|
+
rawData["IronSourceAdapters"] = ironSourceAdapters;
|
|
290
298
|
rawData["UnityVersion"] = Application.unityVersion;
|
|
291
299
|
string platform = "";
|
|
292
300
|
#if UNITY_ANDROID
|
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
|
|
22
|
+
// Check if the MaxSdk mediation directory exists before proceeding
|
|
23
|
+
if (!Directory.Exists(mediationPath))
|
|
24
|
+
{
|
|
25
|
+
return result; // Return empty dictionary if MaxSdk is not installed
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
string[] adapterFolders = Directory.GetDirectories(mediationPath);
|
|
29
|
+
|
|
30
|
+
foreach (string adapterFolder in adapterFolders)
|
|
31
|
+
{
|
|
32
|
+
string adapterName = new DirectoryInfo(adapterFolder).Name;
|
|
33
|
+
string dependencyPath = Path.Combine(adapterFolder, "Editor/Dependencies.xml");
|
|
34
|
+
Versions version = GetCurrentVersions(dependencyPath);
|
|
35
|
+
result.Add(adapterName, $"android_{version.Android}_ios_{version.Ios}");
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
public static Versions GetCurrentVersions(string dependencyPath)
|
|
42
|
+
{
|
|
43
|
+
XDocument dependency;
|
|
44
|
+
try
|
|
45
|
+
{
|
|
46
|
+
dependency = XDocument.Load(dependencyPath);
|
|
47
|
+
}
|
|
48
|
+
#pragma warning disable 0168
|
|
49
|
+
catch (IOException exception)
|
|
50
|
+
#pragma warning restore 0168
|
|
51
|
+
{
|
|
52
|
+
// Couldn't find the dependencies file. The plugin is not installed.
|
|
53
|
+
return new Versions();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// <dependencies>
|
|
57
|
+
// <androidPackages>
|
|
58
|
+
// <androidPackage spec="com.applovin.mediation:network_name-adapter:1.2.3.4" />
|
|
59
|
+
// </androidPackages>
|
|
60
|
+
// <iosPods>
|
|
61
|
+
// <iosPod name="AppLovinMediationNetworkNameAdapter" version="2.3.4.5" />
|
|
62
|
+
// </iosPods>
|
|
63
|
+
// </dependencies>
|
|
64
|
+
string androidVersion = null;
|
|
65
|
+
string iosVersion = null;
|
|
66
|
+
var dependenciesElement = dependency.Element("dependencies");
|
|
67
|
+
if (dependenciesElement != null)
|
|
68
|
+
{
|
|
69
|
+
var androidPackages = dependenciesElement.Element("androidPackages");
|
|
70
|
+
if (androidPackages != null)
|
|
71
|
+
{
|
|
72
|
+
var adapterPackage = androidPackages.Descendants().FirstOrDefault(element => element.Name.LocalName.Equals("androidPackage")
|
|
73
|
+
&& element.FirstAttribute.Name.LocalName.Equals("spec")
|
|
74
|
+
&& element.FirstAttribute.Value.StartsWith("com.applovin"));
|
|
75
|
+
if (adapterPackage != null)
|
|
76
|
+
{
|
|
77
|
+
androidVersion = adapterPackage.FirstAttribute.Value.Split(':').Last();
|
|
78
|
+
// Hack alert: Some Android versions might have square brackets to force a specific version. Remove them if they are detected.
|
|
79
|
+
if (androidVersion.StartsWith("["))
|
|
80
|
+
{
|
|
81
|
+
androidVersion = androidVersion.Trim('[', ']');
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var iosPods = dependenciesElement.Element("iosPods");
|
|
87
|
+
if (iosPods != null)
|
|
88
|
+
{
|
|
89
|
+
var adapterPod = iosPods.Descendants().FirstOrDefault(element => element.Name.LocalName.Equals("iosPod")
|
|
90
|
+
&& element.FirstAttribute.Name.LocalName.Equals("name")
|
|
91
|
+
&& element.FirstAttribute.Value.StartsWith("AppLovin"));
|
|
92
|
+
if (adapterPod != null)
|
|
93
|
+
{
|
|
94
|
+
iosVersion = adapterPod.Attributes().First(attribute => attribute.Name.LocalName.Equals("version")).Value;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
var currentVersions = new Versions();
|
|
100
|
+
if (androidVersion != null && iosVersion != null)
|
|
101
|
+
{
|
|
102
|
+
currentVersions.Unity = string.Format("android_{0}_ios_{1}", androidVersion, iosVersion);
|
|
103
|
+
currentVersions.Android = androidVersion;
|
|
104
|
+
currentVersions.Ios = iosVersion;
|
|
105
|
+
}
|
|
106
|
+
else if (androidVersion != null)
|
|
107
|
+
{
|
|
108
|
+
currentVersions.Unity = string.Format("android_{0}", androidVersion);
|
|
109
|
+
currentVersions.Android = androidVersion;
|
|
110
|
+
}
|
|
111
|
+
else if (iosVersion != null)
|
|
112
|
+
{
|
|
113
|
+
currentVersions.Unity = string.Format("ios_{0}", iosVersion);
|
|
114
|
+
currentVersions.Ios = iosVersion;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return currentVersions;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -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
|