update:更新补单逻辑

This commit is contained in:
2026-06-02 19:50:44 +08:00
parent f06074d9cc
commit 4d3eae1c88
7 changed files with 64 additions and 78 deletions

View File

@@ -54,13 +54,13 @@
追加 ${applicationId}Flexion 包名)作为后缀后,与 GP 版 authority 不同,
两个渠道包可同时安装在同一设备上,不会触发 INSTALL_FAILED_CONFLICTING_PROVIDER。
参考Flexion 官方文档《Unique package name - follow-on requirements》
-->
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider162066986963808.${applicationId}"
android:exported="true"
tools:replace="android:authorities" />
-->
</application>
<queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" />

View File

@@ -34,7 +34,7 @@ dependencies {
// Google Play In-App Review
implementation 'com.google.android.play:review:2.0.1'
// Google Play Billing — tuyoosdk AAR references BillingManager during init
implementation 'com.android.billingclient:billing:6.0.1'
implementation 'com.android.billingclient:billing:7.0.0'
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
@@ -52,7 +52,7 @@ dependencies {
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
implementation platform('com.google.firebase:firebase-bom:32.7.4')
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation 'com.google.firebase:firebase-analytics'
implementation('com.facebook.android:facebook-android-sdk:16.2.0')
@@ -78,6 +78,7 @@ dependencies {
implementation 'com.appsflyer:purchase-connector:2.2.0' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:8
implementation 'com.appsflyer:unity-wrapper:6.17.7' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:6
implementation 'com.google.android.ump:user-messaging-platform:2.1.0' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:5
implementation 'com.tapjoy:tapjoy-android-unitybridge:14.5.0' // Packages/com.unity.package-offerwall/Editor/TJPluginDependencies.xml:10
// Android Resolver Dependencies End
**DEPS**}

View File

@@ -29,6 +29,9 @@ dependencyResolutionManagement {
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://sdk.tapjoy.com/" // Packages/com.unity.package-offerwall/Editor/TJPluginDependencies.xml:9
}
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}

View File

@@ -58,27 +58,13 @@ public class BuildTool
[MenuItem("Tools/Build Android")]
public static void BuildAndroid()
{
BuildParams bparams = new BuildParams()
{
outPath = "../Bin/tysdkTest.apk"
};
BuildAndroid(bparams);
ChannelBuildTool.Build_GooglePlay();
}
[MenuItem("Tools/Build Android With Debug")]
public static void BuildAndroidWithDebug()
{
BuildParams bparams = new BuildParams()
{
outPath = "../Bin/tysdkTest_debug.apk",
};
var buildOptions = BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.WaitForPlayerConnection;
BuildAndroid(bparams, buildOptions);
ChannelBuildTool.Build_GooglePlay_Debug();
}
public static void CIBuildAndroid()

View File

@@ -7,6 +7,8 @@ public class ChannelBuildTool
{
public static readonly string[] SupportedChannels = { "GooglePlay", "Rustore", "Flexion" };
private const string DefaultChannel = "GooglePlay";
private const string DefaultAndroidBundleIdentifier = "com.arkgame.ft";
private const string ExtraCfgRoot = "../ExtraPluginCfgs/Android";
private const string TysdkPlugins = "Packages/tysdk/Plugins/Android";
private const string TysdkFiles = "Packages/tysdk/Files";
@@ -113,35 +115,51 @@ public class ChannelBuildTool
// ==================== Build ====================
private static void RestoreDefaultChannel()
{
Debug.Log($"[ChannelBuild] Restore default channel -> {DefaultChannel}");
SwitchChannel(DefaultChannel);
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, DefaultAndroidBundleIdentifier);
Debug.Log($"[ChannelBuild] Restore bundle identifier -> {DefaultAndroidBundleIdentifier}");
AssetDatabase.SaveAssets();
}
private static void BuildAndroidForChannel(string channel, bool debug)
{
SwitchChannel(channel);
string fileName = debug ? $"tysdkTest_{channel}_debug.apk" : $"tysdkTest_{channel}.apk";
string outPath = $"../Bin/{fileName}";
var buildOptions = debug
? BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.WaitForPlayerConnection
: BuildOptions.None;
var buildPlayerOptions = new BuildPlayerOptions
try
{
scenes = EditorBuildSettings.scenes.Select(x => x.path).ToArray(),
locationPathName = outPath,
target = BuildTarget.Android,
options = buildOptions,
};
SwitchChannel(channel);
Debug.Log($"[ChannelBuild] Building {channel} → {outPath}");
var buildReport = BuildPipeline.BuildPlayer(buildPlayerOptions);
string fileName = debug ? $"tysdkTest_{channel}_debug.apk" : $"tysdkTest_{channel}.apk";
string outPath = $"../Bin/{fileName}";
var buildOptions = debug
? BuildOptions.Development | BuildOptions.AllowDebugging | BuildOptions.WaitForPlayerConnection
: BuildOptions.None;
if (buildReport?.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded)
{
Debug.Log($"[ChannelBuild] Success: {Path.GetFullPath(outPath)}");
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
var buildPlayerOptions = new BuildPlayerOptions
{
scenes = EditorBuildSettings.scenes.Select(x => x.path).ToArray(),
locationPathName = outPath,
target = BuildTarget.Android,
options = buildOptions,
};
Debug.Log($"[ChannelBuild] Building {channel} → {outPath}");
var buildReport = BuildPipeline.BuildPlayer(buildPlayerOptions);
if (buildReport?.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded)
{
Debug.Log($"[ChannelBuild] Success: {Path.GetFullPath(outPath)}");
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
}
else
{
Debug.LogError($"[ChannelBuild] Failed: {buildReport?.summary}");
}
}
else
finally
{
Debug.LogError($"[ChannelBuild] Failed: {buildReport?.summary}");
RestoreDefaultChannel();
}
}
@@ -160,28 +178,6 @@ public class ChannelBuildTool
// ==================== Menu: Build ====================
[MenuItem("Tools/Build Android (Current Channel)")]
public static void Build_CurrentChannel()
{
if (string.IsNullOrEmpty(currentChannel))
{
Debug.LogError("[ChannelBuild] No channel selected. Use Tools/Switch Channel first.");
return;
}
BuildAndroidForChannel(currentChannel, false);
}
[MenuItem("Tools/Build Android (Current Channel) Debug")]
public static void Build_CurrentChannel_Debug()
{
if (string.IsNullOrEmpty(currentChannel))
{
Debug.LogError("[ChannelBuild] No channel selected. Use Tools/Switch Channel first.");
return;
}
BuildAndroidForChannel(currentChannel, true);
}
[MenuItem("Tools/Build Android (Channel)/GooglePlay")]
public static void Build_GooglePlay() => BuildAndroidForChannel("GooglePlay", false);