refactor: FlexionSDKHelper 迁移至 ExtraPluginCfgs + 构建配置更新
- 删除 tysdk/Plugins/Android 下的 FlexionSDKHelper(已迁移至 ExtraPluginCfgs/flexion) - 更新 AndroidManifest/mainTemplate.gradle/settingsTemplate.gradle 配置 - 更新 ChannelHelpers/ConfigManager 渠道配置 - 更新 tuyoosdk AAR 和 google-services.json Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,52 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.arkgame.ft.flexion" xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<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,android:fullBackupContent" android:fullBackupContent="@xml/flexion_backup_rules" android:usesCleartextTraffic="true">
|
||||
<activity android:name="com.unity3d.player.TYUnityActivity" android:theme="@style/UnityThemeSelector">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="https" android:host="fishingtraveliae.onelink.me" android:pathPrefix="/jT1Q" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:host="mainactivity" android:scheme="zzft" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
|
||||
</activity>
|
||||
<!-- 渠道标识,ChannelManager 读取此值以识别 Flexion 渠道 -->
|
||||
<meta-data android:name="CHANNEL" android:value="Flexion" />
|
||||
<!-- 覆盖 gasdk 与 tuyoosdk 的 MainProcessName 冲突 -->
|
||||
<meta-data android:name="com.sensorsdata.analytics.android.MainProcessName" android:value="com.arkgame.ft.flexion" tools:replace="android:value" />
|
||||
<!-- Flexion SDK 应用标识,从 DropPoint 获取 -->
|
||||
<meta-data android:name="com.flexionmobile.fdk.apptoken" android:value="fishingtravel" />
|
||||
<!-- 告知 Flexion SDK 当前为 Unity 项目,必须声明 -->
|
||||
<meta-data android:name="com.flexionmobile.fdk.sdk-type" android:value="unity" />
|
||||
<!--
|
||||
覆盖 tuyoosdk AAR 中硬编码的 Facebook ContentProvider authority。
|
||||
AAR 原值:com.facebook.app.FacebookContentProvider162066986963808
|
||||
追加 ${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" />
|
||||
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" />
|
||||
</queries>
|
||||
</manifest>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.arkgame.ft"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<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" android:usesCleartextTraffic="true">
|
||||
<activity android:name="com.unity3d.player.TYUnityActivity"
|
||||
android:theme="@style/UnityThemeSelector">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter android:autoVerify="true">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="https" android:host="fishingtraveliae.onelink.me" android:pathPrefix="/jT1Q"/>
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:host="mainactivity" android:scheme="zzft" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
|
||||
|
||||
<meta-data android:name="google_analytics_default_allow_analytics_storage" android:value="true" />
|
||||
<meta-data android:name="google_analytics_default_allow_ad_storage" android:value="true" />
|
||||
<meta-data android:name="google_analytics_default_allow_ad_user_data" android:value="true" />
|
||||
<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="true" />
|
||||
|
||||
</activity>
|
||||
<meta-data android:name="CHANNEL" android:value="GooglePlay" />
|
||||
</application>
|
||||
<queries>
|
||||
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> <!-- allows app to access Facebook app features -->
|
||||
<provider android:authorities="com.facebook.orca.provider.PlatformProvider" /> <!-- allows sharing to Messenger app -->
|
||||
<intent>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
|
||||
@@ -13,14 +13,7 @@ android {
|
||||
}
|
||||
// Android Resolver Exclusions End
|
||||
android {
|
||||
namespace "com.unity3d.player"
|
||||
}
|
||||
|
||||
// Flexion 渠道专用:排除不需要的 AppsFlyer 模块
|
||||
// - purchase-connector: 基于 Google Play Billing,Flexion 不走 GP 计费,没用还增大包
|
||||
// 即使 Unity Android Resolver 下次又把 implementation 行写回来,这里的 exclude 也兜底排除
|
||||
configurations.all {
|
||||
exclude group: 'com.appsflyer', module: 'purchase-connector'
|
||||
namespace "com.unity3d.player"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -38,17 +31,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'
|
||||
|
||||
// Flexion SDK (includes wrapped billing)
|
||||
implementation("com.flexionmobile:sdk:4.0.1")
|
||||
|
||||
implementation('com.android.billingclient:billing:7.0.0')
|
||||
|
||||
implementation 'com.google.android.gms:play-services-basement:18.2.0'
|
||||
implementation 'androidx.fragment:fragment:1.3.6'
|
||||
implementation "org.jetbrains.kotlin:kotlin-reflect:1.3.41"
|
||||
@@ -59,7 +48,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')
|
||||
@@ -70,8 +59,6 @@ dependencies {
|
||||
implementation "androidx.credentials:credentials-play-services-auth:1.3.0"
|
||||
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
|
||||
|
||||
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
|
||||
|
||||
// Android Resolver Dependencies Start
|
||||
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
|
||||
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
|
||||
@@ -88,27 +75,14 @@ dependencies {
|
||||
// Android Resolver Dependencies End
|
||||
**DEPS**}
|
||||
|
||||
// Android Resolver Exclusions Start
|
||||
android {
|
||||
packagingOptions {
|
||||
exclude ('/lib/armeabi/*' + '*')
|
||||
exclude ('/lib/mips/*' + '*')
|
||||
exclude ('/lib/mips64/*' + '*')
|
||||
exclude ('/lib/x86/*' + '*')
|
||||
exclude ('/lib/x86_64/*' + '*')
|
||||
}
|
||||
}
|
||||
// Android Resolver Exclusions End
|
||||
android {
|
||||
ndkPath "**NDKPATH**"
|
||||
|
||||
compileSdkVersion **APIVERSION**
|
||||
buildToolsVersion '**BUILDTOOLS**'
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
coreLibraryDesugaringEnabled true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
@@ -117,7 +91,6 @@ android {
|
||||
ndk {
|
||||
abiFilters **ABIFILTERS**
|
||||
}
|
||||
|
||||
versionCode **VERSIONCODE**
|
||||
versionName '**VERSIONNAME**'
|
||||
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
|
||||
|
||||
@@ -16,17 +16,6 @@ dependencyResolutionManagement {
|
||||
**ARTIFACTORYREPOSITORY**
|
||||
google()
|
||||
mavenCentral()
|
||||
|
||||
// Flexion SDK Maven Repository
|
||||
maven {
|
||||
url = uri("https://maven.pkg.github.com/FlexionSDK/JavaSDK")
|
||||
credentials {
|
||||
username = "FlexionSDK"
|
||||
// Replace with your actual Flexion PAT from DropPoint
|
||||
password = "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"
|
||||
}
|
||||
}
|
||||
|
||||
// Android Resolver Repos Start
|
||||
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
|
||||
maven {
|
||||
|
||||
Reference in New Issue
Block a user