feat: Flexion channel build fixes

- Add google-services.json per-channel copy in SwitchChannel (Flexion has extra client)
- Add GooglePlay default google-services.json for fallback
- Switch Bundle Identifier per channel (Flexion → com.arkgame.ft.flexion)
- Fix FlexionSDKHelper missing BillingService import
- Fix Flexion AndroidManifest: add fullBackupContent override with flexion_backup_rules
- Add MainProcessName tools:replace to resolve gasdk/tuyoosdk manifest conflict
- Add billing:6.0.1 dependency for tuyoosdk AAR init compatibility

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-04-30 17:08:53 +08:00
parent d361d9078b
commit 8133f4d1b2
10 changed files with 178 additions and 11 deletions

View File

@@ -9,6 +9,7 @@ public class ChannelBuildTool
private const string ExtraCfgRoot = "../ExtraPluginCfgs/Android";
private const string TysdkPlugins = "Packages/tysdk/Plugins/Android";
private const string TysdkFiles = "Packages/tysdk/Files";
private const string AssetsPlugins = "Assets/Plugins/Android";
private static readonly string[] GradleFiles =
@@ -78,7 +79,24 @@ public class ChannelBuildTool
Debug.Log($"[ChannelSwitch] Java: {javaFile} → {dest}");
}
// 5. Set runtime channel
// 5. Sync google-services.json (fallback to GooglePlay default)
var srcGoogleServices = Path.Combine(cfgDir, "Files/google-services.json");
if (!File.Exists(srcGoogleServices))
srcGoogleServices = Path.Combine(ExtraCfgRoot, "googleplay/Files/google-services.json");
var destGoogleServices = Path.Combine(TysdkFiles, "google-services.json");
File.Copy(srcGoogleServices, destGoogleServices, true);
Debug.Log($"[ChannelSwitch] google-services.json: {srcGoogleServices} → {destGoogleServices}");
// 6. Set Bundle Identifier per channel
var bundleId = channel switch
{
"Flexion" => "com.arkgame.ft.flexion",
_ => "com.arkgame.ft"
};
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, bundleId);
Debug.Log($"[CHANNEL-VERIFY] Bundle Identifier → {bundleId}");
// 7. Set runtime channel
tysdk.ChannelConfig.SetChannel(channel);
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);

View File

@@ -72,7 +72,6 @@ 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

@@ -18,9 +18,6 @@ dependencyResolutionManagement {
mavenCentral()
// 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
}