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:
@@ -7,7 +7,8 @@
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<application android:extractNativeLibs="true" android:name="com.unity3d.player.TYApp"
|
||||
tools:replace="android:usesCleartextTraffic"
|
||||
tools:replace="android:usesCleartextTraffic,android:fullBackupContent"
|
||||
android:fullBackupContent="@xml/flexion_backup_rules"
|
||||
android:usesCleartextTraffic="true">
|
||||
<activity android:name="com.unity3d.player.TYUnityActivity"
|
||||
android:theme="@style/UnityThemeSelector">
|
||||
@@ -36,6 +37,11 @@
|
||||
<!-- 渠道标识,ChannelManager 读取此值以识别 Flexion 渠道 -->
|
||||
<meta-data android:name="CHANNEL" android:value="Flexion" />
|
||||
|
||||
<!-- 覆盖 gasdk 与 tuyoosdk 的 MainProcessName 冲突 -->
|
||||
<meta-data android:name="com.sensorsdata.analytics.android.MainProcessName"
|
||||
android:value="${applicationId}"
|
||||
tools:replace="android:value" />
|
||||
|
||||
<!-- Flexion SDK 应用标识,从 DropPoint 获取 -->
|
||||
<meta-data android:name="com.flexionmobile.fdk.apptoken" android:value="fishingtravel" />
|
||||
|
||||
|
||||
100
ExtraPluginCfgs/Android/flexion/Files/google-services.json
Normal file
100
ExtraPluginCfgs/Android/flexion/Files/google-services.json
Normal file
@@ -0,0 +1,100 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "481260393117",
|
||||
"project_id": "fishing-travel",
|
||||
"storage_bucket": "fishing-travel.firebasestorage.app"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:481260393117:android:4e8da50d0ee3b5c207fa74",
|
||||
"android_client_info": {
|
||||
"package_name": "com.arkgame.ft"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-jhq50gh6n2p6pat1bjhcgj3th1ke19jg.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.arkgame.ft",
|
||||
"certificate_hash": "c9cf2f5eaba383cbdd5b968d0342c49afabc32a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "481260393117-vfn1jueugjqjach8kgc0kfi54g085q6l.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.arkgame.ft",
|
||||
"certificate_hash": "53fd6ff623712411792a4665163e4cbf4a7a22ec"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.arkgame.ft",
|
||||
"app_store_id": "6505145935"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:481260393117:android:eafec4a060b0224907fa74",
|
||||
"android_client_info": {
|
||||
"package_name": "com.arkgame.ft.flexion"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
},
|
||||
{
|
||||
"client_id": "481260393117-88n0v3ht8ashhk0r5ri47hced7o5qj62.apps.googleusercontent.com",
|
||||
"client_type": 2,
|
||||
"ios_info": {
|
||||
"bundle_id": "com.arkgame.ft",
|
||||
"app_store_id": "6505145935"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import com.flexionmobile.ddpx.model.params.BillingFlowParams;
|
||||
import com.flexionmobile.ddpx.model.params.ConsumeParams;
|
||||
import com.flexionmobile.ddpx.model.params.QueryPurchasesParams;
|
||||
import com.flexionmobile.ddpx.model.params.ProductDetailsParams;
|
||||
import com.flexionmobile.ddpx.service.BillingService;
|
||||
import com.flexionmobile.fdk.FLX;
|
||||
|
||||
import com.tuyoo.gamesdk.api.SDKAPI;
|
||||
|
||||
Binary file not shown.
@@ -1,6 +1,5 @@
|
||||
apply plugin: 'com.android.application'
|
||||
// 临时注销掉,打完包之后就打开
|
||||
// apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
|
||||
dependencies {
|
||||
implementation project(':unityLibrary')
|
||||
|
||||
@@ -38,13 +38,13 @@ dependencies {
|
||||
api "io.reactivex:rxandroid:1.2.1"
|
||||
api "io.reactivex:rxjava:1.1.9"
|
||||
|
||||
// Google Play In-App Review
|
||||
// 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 'net.aihelp:android-aihelp-aar:5.3.+'
|
||||
|
||||
implementation 'com.google.android.gms:play-services-auth:20.2.0'
|
||||
// NOTE: Google Play BillingClient NOT included — Flexion SDK provides its own billing wrapper
|
||||
// implementation('com.android.billingclient:billing:6.0.1')
|
||||
|
||||
// Flexion SDK (includes wrapped billing)
|
||||
implementation("com.flexionmobile:sdk:4.0.1")
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "481260393117",
|
||||
"project_id": "fishing-travel",
|
||||
"storage_bucket": "fishing-travel.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:481260393117:android:4e8da50d0ee3b5c207fa74",
|
||||
"android_client_info": {
|
||||
"package_name": "com.arkgame.ft"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-jhq50gh6n2p6pat1bjhcgj3th1ke19jg.apps.googleusercontent.com",
|
||||
"client_type": 1,
|
||||
"android_info": {
|
||||
"package_name": "com.arkgame.ft",
|
||||
"certificate_hash": "c9cf2f5eaba383cbdd5b968d0342c49afabc32a2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBU6gAwu0O28jg7-TRd_Vx2YMCH_Baa8Bw"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "481260393117-0ah0ekk7lu5r44ko2uqlfoebgak8dmhj.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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**}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user