h5sdk提交

This commit is contained in:
2026-07-06 16:31:08 +08:00
parent 761e670f01
commit 3c0298f19f
1183 changed files with 107360 additions and 42666 deletions
@@ -19,6 +19,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
{
"AdColony",
"Criteo",
"LinkedIn",
"Nend",
"Snap",
"Tapjoy",
@@ -373,7 +373,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
{
if (!webResponse.IsSuccess)
{
MaxSdkLogger.E("Failed to load plugin data. Please check your internet connection.");
MaxSdkLogger.UserError("Failed to load plugin data. Please check your internet connection.");
return null;
}
@@ -27,8 +27,6 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
private const string PropertyAndroidX = "android.useAndroidX";
private const string PropertyJetifier = "android.enableJetifier";
private const string EnableProperty = "=true";
private const string PropertyDexingArtifactTransform = "android.enableDexingArtifactTransform";
private const string DisableProperty = "=false";
private const string KeyMetaDataAppLovinVerboseLoggingOn = "applovin.sdk.verbose_logging";
private const string KeyMetaDataGoogleApplicationId = "com.google.android.gms.ads.APPLICATION_ID";
@@ -82,19 +80,13 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
var lines = File.ReadAllLines(gradlePropertiesPath);
// Add all properties except AndroidX, Jetifier, and DexingArtifactTransform since they may already exist. We will re-add them below.
gradlePropertiesUpdated.AddRange(lines.Where(line => !line.Contains(PropertyAndroidX) && !line.Contains(PropertyJetifier) && !line.Contains(PropertyDexingArtifactTransform)));
gradlePropertiesUpdated.AddRange(lines.Where(line => !line.Contains(PropertyAndroidX) && !line.Contains(PropertyJetifier)));
}
// Enable AndroidX and Jetifier properties
gradlePropertiesUpdated.Add(PropertyAndroidX + EnableProperty);
gradlePropertiesUpdated.Add(PropertyJetifier + EnableProperty);
// `DexingArtifactTransform` has been removed in Gradle 8+ which is the default Gradle version for Unity 6.
#if !UNITY_6000_0_OR_NEWER
// Disable dexing using artifact transform (it causes issues for ExoPlayer with Gradle plugin 3.5.0+)
gradlePropertiesUpdated.Add(PropertyDexingArtifactTransform + DisableProperty);
#endif
try
{
File.WriteAllText(gradlePropertiesPath, string.Join("\n", gradlePropertiesUpdated.ToArray()) + "\n");
@@ -282,7 +274,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
}
else
{
MaxSdkLogger.E("Failed to set distribution URL");
MaxSdkLogger.UserError("Failed to set distribution URL");
}
}
@@ -292,7 +284,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
// Unity 2022.3+ requires Gradle Plugin version 7.1.2+.
if (MaxSdkUtils.CompareVersions(customGradleToolsVersion, "7.1.2") == MaxSdkUtils.VersionComparisonResult.Lesser)
{
MaxSdkLogger.E("Failed to set gradle plugin version. Unity 2022.3+ requires gradle plugin version 7.1.2+");
MaxSdkLogger.UserError("Failed to set gradle plugin version. Unity 2022.3+ requires gradle plugin version 7.1.2+");
return;
}
@@ -303,7 +295,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
}
else
{
MaxSdkLogger.E("Failed to set gradle library version");
MaxSdkLogger.UserError("Failed to set gradle library version");
}
var newGradleVersionLine = AppLovinProcessGradleBuildFile.GetFormattedBuildScriptLine(string.Format("id 'com.android.application' version '{0}' apply false", customGradleToolsVersion));
@@ -316,7 +308,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
}
else
{
MaxSdkLogger.E("Failed to set gradle plugin version");
MaxSdkLogger.UserError("Failed to set gradle plugin version");
}
}
}
@@ -224,7 +224,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
var pluginData = AppLovinIntegrationManager.LoadPluginDataSync();
if (pluginData == null)
{
MaxSdkLogger.E("Failed to load plugin data. Dynamic libraries will not be embedded.");
MaxSdkLogger.UserError("Failed to load plugin data. Dynamic libraries will not be embedded.");
return null;
}
@@ -57,7 +57,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
}
catch (Exception exception)
{
MaxSdkLogger.E("Unable to load Dependencies file due to exception: " + exception.Message);
MaxSdkLogger.UserError("Unable to load Dependencies file due to exception: " + exception.Message);
}
return null;
@@ -173,7 +173,7 @@ namespace AppLovinMax.Scripts.IntegrationManager.Editor
}
catch (Exception exception)
{
MaxSdkLogger.E("Unable to save Dependencies file due to exception: " + exception.Message);
MaxSdkLogger.UserError("Unable to save Dependencies file due to exception: " + exception.Message);
}
return false;