update:更新补单逻辑
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.unity3d.player;
|
||||
|
||||
public class ChannelEntry {
|
||||
|
||||
|
||||
public static final String CHANNEL = "Flexion";
|
||||
|
||||
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
|
||||
@@ -14,7 +14,7 @@ public class ChannelEntry {
|
||||
public static String normalizeSkuList(String msg) {
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//public SDKExtBuilder;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -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**}
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@ dependencyResolutionManagement {
|
||||
}
|
||||
|
||||
// Android Resolver Repos Start
|
||||
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
|
||||
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
|
||||
}
|
||||
|
||||
@@ -55,31 +55,17 @@ public class BuildTool
|
||||
BuildiOS(bparams);
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Build Android")]
|
||||
public static void BuildAndroid()
|
||||
{
|
||||
|
||||
BuildParams bparams = new BuildParams()
|
||||
{
|
||||
outPath = "../Bin/tysdkTest.apk"
|
||||
};
|
||||
|
||||
BuildAndroid(bparams);
|
||||
}
|
||||
|
||||
[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);
|
||||
}
|
||||
[MenuItem("Tools/Build Android")]
|
||||
public static void BuildAndroid()
|
||||
{
|
||||
ChannelBuildTool.Build_GooglePlay();
|
||||
}
|
||||
|
||||
[MenuItem("Tools/Build Android With Debug")]
|
||||
public static void BuildAndroidWithDebug()
|
||||
{
|
||||
ChannelBuildTool.Build_GooglePlay_Debug();
|
||||
}
|
||||
|
||||
public static void CIBuildAndroid()
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,29 +177,7 @@ public class ChannelBuildTool
|
||||
public static void Switch_Flexion() => SwitchChannel("Flexion");
|
||||
|
||||
// ==================== 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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user