feat(integration): 添加 AppLovin SDK 集成管理功能

- 实现 AppLovinIntegrationManagerUtils 版本比较工具类
- 添加 AppLovinPackageManager 处理 UPM 和 Assets 包管理
- 实现 AppLovinPluginMigrationHelper 插件迁移辅助功能
- 添加 AppLovinUpmManifest 管理 UPM 清单文件操作
- 支持 mediation adapter 的版本检测和安装管理
- 实现重复适配器检测和删除功能
This commit is contained in:
2026-01-20 19:01:21 +08:00
parent 4da1b3290e
commit 5b3dfd98c2
76 changed files with 3768 additions and 3668 deletions

View File

@@ -439,25 +439,30 @@ namespace AppLovinMax.ThirdParty.MiniJson
/// <summary>
/// Converts a IDictionary / IList object or a simple type (string, int, etc.) into a JSON string
/// </summary>
/// <param name="json">A Dictionary&lt;string, object&gt; / List&lt;object&gt;</param>
/// <param name="obj">A Dictionary&lt;string, object&gt; / List&lt;object&gt;</param>
/// <param name="prettyPrint">Whether to pretty print the json string</param>
/// <returns>A JSON encoded string, or null if object 'json' is not serializable</returns>
public static string Serialize(object obj)
public static string Serialize(object obj, bool prettyPrint = false)
{
return Serializer.Serialize(obj);
return Serializer.Serialize(obj, prettyPrint);
}
sealed class Serializer
{
StringBuilder builder;
bool prettyPrint;
int indentLevel;
Serializer()
Serializer(bool prettyPrint)
{
builder = new StringBuilder();
this.prettyPrint = prettyPrint;
indentLevel = 0;
}
public static string Serialize(object obj)
public static string Serialize(object obj, bool prettyPrint)
{
var instance = new Serializer();
var instance = new Serializer(prettyPrint);
instance.SerializeValue(obj);
@@ -506,21 +511,48 @@ namespace AppLovinMax.ThirdParty.MiniJson
builder.Append('{');
indentLevel++;
if (prettyPrint)
{
builder.AppendLine();
}
foreach (object e in obj.Keys)
{
if (!first)
{
builder.Append(',');
if (prettyPrint)
{
builder.AppendLine();
}
}
if (prettyPrint)
{
builder.Append(new string(' ', indentLevel * 4));
}
SerializeString(e.ToString());
builder.Append(':');
if (prettyPrint)
{
builder.Append(' ');
}
SerializeValue(obj[e]);
first = false;
}
indentLevel--;
if (prettyPrint)
{
builder.AppendLine();
builder.Append(new string(' ', indentLevel * 4));
}
builder.Append('}');
}
@@ -528,6 +560,12 @@ namespace AppLovinMax.ThirdParty.MiniJson
{
builder.Append('[');
indentLevel++;
if (prettyPrint)
{
builder.AppendLine();
}
bool first = true;
foreach (object obj in anArray)
@@ -535,6 +573,15 @@ namespace AppLovinMax.ThirdParty.MiniJson
if (!first)
{
builder.Append(',');
if (prettyPrint)
{
builder.AppendLine();
}
}
if (prettyPrint)
{
builder.Append(new string(' ', indentLevel * 4));
}
SerializeValue(obj);
@@ -542,6 +589,13 @@ namespace AppLovinMax.ThirdParty.MiniJson
first = false;
}
indentLevel--;
if (prettyPrint)
{
builder.AppendLine();
builder.Append(new string(' ', indentLevel * 4));
}
builder.Append(']');
}