update:ChannelConfig 更新

This commit is contained in:
2026-07-14 20:20:03 +08:00
parent 2107f437a7
commit 7fe8ed85ec
64 changed files with 521 additions and 1367 deletions

6
.gitignore vendored
View File

@@ -8,4 +8,10 @@ sdk-intergration/.idea
.worktrees/* .worktrees/*
.docs/* .docs/*
.claude/* .claude/*
sdk-intergration/Assets/Plugins/Android/channel_gradle/
sdk-intergration/Assets/Plugins/Android/channel_gradle.meta
sdk-intergration/Assets/Plugins/Android/channel_manifest_lib/build/
sdk-intergration/Assets/Plugins/Android/channel_manifest_lib/build.meta
ChannelConfigs/Android/*/Plugins/Android/gradle/.gradle/
ChannelConfigs/Android/*/Plugins/Android/gradle/build/

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application>
<!-- Put channel manifest increment here. -->
</application>
</manifest>

View File

@@ -0,0 +1,8 @@
package com.unity3d.player;
public class ChannelAdapter extends ChannelAdapterBase {
private static class Config {
public String SDK_CLIENTID = "ReplaceWithChannelClientId";
}
}

View File

@@ -0,0 +1,12 @@
# Files
可选目录。
如果渠道提供 `google-services.json`,放在这里:
```text
Files/google-services.json
```
没有渠道专用文件时可以保持为空。

View File

@@ -0,0 +1,16 @@
# Plugins/Android
可选目录。
渠道 SDK 的 `.aar` / `.jar` 放在这里。切渠道时,这里的第一层插件文件会同步到:
```text
sdk-intergration/Packages/tysdk/Plugins/Android
```
Gradle 增量放到:
```text
Plugins/Android/gradle/
```

View File

@@ -0,0 +1,26 @@
// Applied to :unityLibrary from mainTemplate.gradle.
// Put channel dependencies and android module config here.
dependencies {
// implementation "group:name:version"
// api "group:name:version"
// coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
}
android {
// compileOptions {
// coreLibraryDesugaringEnabled true
// }
// packagingOptions {
// exclude "**/unused.file"
// pickFirst "**/duplicated.file"
// }
// defaultConfig {
// manifestPlaceholders += [
// key: "value"
// ]
// }
}

View File

@@ -0,0 +1,11 @@
// Applied from settingsTemplate.gradle.
// Put channel Maven repositories or extra module includes here.
dependencyResolutionManagement {
repositories {
// maven {
// url "https://example.maven.repo/"
// }
}
}

View File

@@ -0,0 +1,49 @@
# Android 渠道接入模板
复制 `_template` 为新渠道目录,例如:
```text
ChannelConfigs/Android/mychannel
```
然后按需填写下列文件。
## 目录说明
```text
AndroidManifest.xml
ChannelAdapter.java
Files/
README.md
Plugins/
Android/
README.md
gradle/
main.gradle
settings.gradle
```
## 新增渠道步骤
1. 复制 `_template` 并改名为渠道小写目录名。
2.`ChannelAdapter.java` 改名为真实 Adapter例如 `MyChannelAdapter.java`
3. 修改 Adapter 类名,并按渠道 SDK 文档实现需要的接口。
4. `AndroidManifest.xml` 只写渠道 Manifest 增量,不复制主 Manifest。
5. 渠道有 `google-services.json` 时放到 `Files/`
6. 渠道有 `.aar` / `.jar` 时放到 `Plugins/Android/`
7. 渠道要求添加依赖或 `android {}` 配置时,写到 `Plugins/Android/gradle/main.gradle`
8. 渠道要求添加 Maven 仓库或额外 module 时,写到 `Plugins/Android/gradle/settings.gradle`
## 不要复制这些文件
不要在渠道目录放整份 Unity Gradle 模板:
```text
mainTemplate.gradle
settingsTemplate.gradle
launcherTemplate.gradle
baseProjectTemplate.gradle
gradleTemplate.properties
```
主模板由 `sdk-intergration/Assets/Plugins/Android/` 统一维护,渠道只提供增量。

View File

@@ -0,0 +1,9 @@
dependencies {
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
}
android {
compileOptions {
coreLibraryDesugaringEnabled true
}
}

View File

@@ -0,0 +1,10 @@
dependencies {
implementation("com.flexionmobile:sdk:4.0.1")
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
}
android {
compileOptions {
coreLibraryDesugaringEnabled true
}
}

View File

@@ -0,0 +1,11 @@
dependencyResolutionManagement {
repositories {
maven {
url = uri("https://maven.pkg.github.com/FlexionSDK/JavaSDK")
credentials {
username = "FlexionSDK"
password = "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"
}
}
}
}

View File

@@ -0,0 +1,13 @@
dependencies {
implementation(platform("ru.rustore.sdk:bom:2025.11.01"))
implementation("ru.rustore.sdk:pay")
implementation "ru.rustore.sdk:review:10.0.0"
implementation "com.vk.id:vkid:2.5.1"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
}
android {
compileOptions {
coreLibraryDesugaringEnabled true
}
}

View File

@@ -0,0 +1,13 @@
dependencyResolutionManagement {
repositories {
maven {
url "https://artifactory-external.vkpartner.ru/artifactory/vkid-sdk-android/"
}
maven {
url "https://artifactory-external.vkpartner.ru/artifactory/maven/"
}
maven {
url "https://artifactory-external.vkpartner.ru/artifactory/vk-id-captcha/android/"
}
}
}

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application>
<!-- TW 渠道,程序内部用来区分 -->
<meta-data android:name="com.arkgame.ft.channel" android:value="TW" />
<!-- AppsFlyer 用来区分 -->
<meta-data android:name="CHANNEL" android:value="TW" />
</application>
</manifest>

View File

@@ -0,0 +1,39 @@
{
"project_info": {
"project_number": "679771497905",
"project_id": "fishing-travel-tw",
"storage_bucket": "fishing-travel-tw.firebasestorage.app"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:679771497905:android:062e2b39ee6613ad210990",
"android_client_info": {
"package_name": "com.arkgame.ft.tw"
}
},
"oauth_client": [
{
"client_id": "679771497905-9d8ht9dnuhbn70p72hhc5ld29lfbqhpr.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCvYkrDG0tMViVdQ28VGQJ1NpgwkROm_9U"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "679771497905-9d8ht9dnuhbn70p72hhc5ld29lfbqhpr.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
}
],
"configuration_version": "1"
}

View File

@@ -0,0 +1,9 @@
dependencies {
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
}
android {
compileOptions {
coreLibraryDesugaringEnabled true
}
}

View File

@@ -0,0 +1,16 @@
# TW Android 渠道配置
当前 TW 渠道先按 GooglePlay 派生包整理,只保留渠道目录和 Manifest 增量入口。
如果 TW 后续有独立配置,按需补充:
```text
Files/google-services.json
Plugins/Android/tuyoosdk_1.0.0.aar
Plugins/Android/gradle/main.gradle
Plugins/Android/gradle/settings.gradle
AddressableAssetsData/Android/addressables_content_state.bin
TWAdapter.java
```
不要在此目录放整份 Unity Gradle 模板文件,只放渠道增量。

View File

@@ -0,0 +1,24 @@
package com.unity3d.player;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONObject;
import java.util.Locale;
// Tw 渠道
public class TWAdapter extends ChannelAdapterBase {
private static final String TAG = "TWAdapter";
//- tw包
private static class Config {
//-
public String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.rustore.FishingTravelTw";
//-
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-ts02.sdk-k8s-us-gcp.arksgame.com";
}
}

View File

@@ -1,13 +0,0 @@
package com.unity3d.player;
public class ChannelEntry {
public static final String CHANNEL = "EnjoyPay";
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
return null;
}
public static String normalizeSkuList(String msg) {
return msg;
}
}

View File

@@ -1,26 +0,0 @@
package com.unity3d.player;
public class ConfigManager {
// Common SDK parameters
public static int SDK_APPID = 20587;
public static String SDK_GAMEID = "20587";
public static String SDK_PROJECTID = "20587";
public static String SDK_CLOUDID = "128";
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.googleplay.FishingMasterRussia";
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
// FCM (anti-addiction system)
public static String FCM_NAMESPACE = "128";
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
// Unity Facade callback names
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
public static final String LINKACCOUT_CALLBACK_FUNCTION_NAME = "LinkAccoutResult";
public static final String CHANGELINK_CALLBACK_FUNCTION_NAME = "ChangeLinkAccountResult";
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
public static final String INIT_CALLBACK_FUNCTION_NAME = "InitResult";
}

View File

@@ -1,11 +0,0 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -1,65 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation project(':unityLibrary')
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation 'com.google.firebase:firebase-analytics'
}
android {
namespace "**NAMESPACE**"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
lintOptions {
abortOnError false
}
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

View File

@@ -1,121 +0,0 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// 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 {
namespace "com.unity3d.player"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':channel_manifest_lib')
api "com.android.support:support-v4:28.0.0"
api "com.android.support:appcompat-v7:28.0.0"
api "com.google.code.gson:gson:2.8.6"
api "com.squareup.okio:okio:1.15.0"
api "com.squareup.okhttp3:okhttp:3.12.13"
api "com.squareup.retrofit2:retrofit:2.3.0"
api "com.squareup.retrofit2:converter-gson:2.2.0"
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
api "io.reactivex:rxandroid:1.2.1"
api "io.reactivex:rxjava:1.1.9"
// Google Play In-App Review
implementation 'com.google.android.play:review:2.0.1'
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
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"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
implementation 'androidx.core:core:1.8.0'
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
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')
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation "androidx.credentials:credentials:1.3.0"
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"
// EnjoyPay SDK is provided by Plugins/Android/tuyoosdk_1.0.0.aar and copied by ChannelBuildTool.
// Android Resolver Dependencies Start
implementation 'androidx.recyclerview:recyclerview:1.2.1' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:9
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
implementation 'com.applovin.mediation:bytedance-adapter:8.1.0.3.0' // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:mintegral-adapter:17.1.61.0' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:moloco-adapter:4.9.0.0' // Assets/MaxSdk/Mediation/Moloco/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:yandex-adapter:8.1.0.0' // Assets/MaxSdk/Mediation/Yandex/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
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**}
android {
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
coreLibraryDesugaringEnabled true
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@@ -1,49 +0,0 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
def channelUnityProjectPath = $/**DIR_UNITYPROJECT**/$.replace("\\", "/")
include ':channel_manifest_lib'
project(':channel_manifest_lib').projectDir = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_manifest_lib')
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
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://artifact.bytedance.com/repository/pangle" // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
}
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
maven {
url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
maven {
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
allowInsecureProtocol = true
}
}
}

View File

@@ -1,11 +0,0 @@
org.gradle.jvmargs=-Xmx8192m
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -1,65 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation project(':unityLibrary')
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation 'com.google.firebase:firebase-analytics'
}
android {
namespace "**NAMESPACE**"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
lintOptions {
abortOnError false
}
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

View File

@@ -1,136 +0,0 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// 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 {
namespace "com.unity3d.player"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':channel_manifest_lib')
api "com.android.support:support-v4:28.0.0"
api "com.android.support:appcompat-v7:28.0.0"
api "com.google.code.gson:gson:2.8.6"
api "com.squareup.okio:okio:1.15.0"
api "com.squareup.okhttp3:okhttp:3.12.13"
api "com.squareup.retrofit2:retrofit:2.3.0"
api "com.squareup.retrofit2:converter-gson:2.2.0"
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
api "io.reactivex:rxandroid:1.2.1"
api "io.reactivex:rxjava:1.1.9"
// Google Play In-App Review
implementation 'com.google.android.play:review:2.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"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
implementation 'androidx.core:core:1.8.0'
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
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')
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation "androidx.credentials:credentials:1.3.0"
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 'androidx.recyclerview:recyclerview:1.2.1' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:9
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
implementation 'com.applovin.mediation:bytedance-adapter:8.1.0.3.0' // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:mintegral-adapter:17.1.61.0' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:moloco-adapter:4.9.0.0' // Assets/MaxSdk/Mediation/Moloco/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:yandex-adapter:8.1.0.0' // Assets/MaxSdk/Mediation/Yandex/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
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**}
// 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 {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@@ -1,58 +0,0 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
def channelUnityProjectPath = $/**DIR_UNITYPROJECT**/$.replace("\\", "/")
include ':channel_manifest_lib'
project(':channel_manifest_lib').projectDir = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_manifest_lib')
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**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 {
url "https://sdk.tapjoy.com/" // Packages/com.unity.package-offerwall/Editor/TJPluginDependencies.xml:9
}
maven {
url "https://artifact.bytedance.com/repository/pangle" // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
}
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
maven {
url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
maven {
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
allowInsecureProtocol = true
}
}
}

View File

@@ -1,48 +0,0 @@
<?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="com.arkgame.ft.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>

View File

@@ -1,13 +0,0 @@
package com.unity3d.player;
public class ChannelEntry {
public static final String CHANNEL = "GooglePlay";
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
return null;
}
public static String normalizeSkuList(String msg) {
return msg;
}
}

View File

@@ -1,29 +0,0 @@
package com.unity3d.player;
public class ConfigManager {
// Common SDK parameters
public static int SDK_APPID = 20587;
public static String SDK_GAMEID = "20587";
public static String SDK_PROJECTID = "20587";
public static String SDK_CLOUDID = "128";
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.googleplay.FishingMaster";
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
// FCM (anti-addiction system)
public static String FCM_NAMESPACE = "128";
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
// Unity Facade callback names
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
public static final String LINKACCOUT_CALLBACK_FUNCTION_NAME = "LinkAccoutResult";
public static final String CHANGELINK_CALLBACK_FUNCTION_NAME = "ChangeLinkAccountResult";
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
public static final String INIT_CALLBACK_FUNCTION_NAME = "InitResult";
}

View File

@@ -1,47 +0,0 @@
{
"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"
}

View File

@@ -1,11 +0,0 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -1,65 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation project(':unityLibrary')
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation 'com.google.firebase:firebase-analytics'
}
android {
namespace "**NAMESPACE**"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
lintOptions {
abortOnError false
}
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

View File

@@ -1,117 +0,0 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// 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 {
namespace "com.unity3d.player"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':channel_manifest_lib')
api "com.android.support:support-v4:28.0.0"
api "com.android.support:appcompat-v7:28.0.0"
api "com.google.code.gson:gson:2.8.6"
api "com.squareup.okio:okio:1.15.0"
api "com.squareup.okhttp3:okhttp:3.12.13"
api "com.squareup.retrofit2:retrofit:2.3.0"
api "com.squareup.retrofit2:converter-gson:2.2.0"
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
api "io.reactivex:rxandroid:1.2.1"
api "io.reactivex:rxjava:1.1.9"
// Google Play In-App Review
implementation 'com.google.android.play:review:2.0.1'
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
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"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
implementation 'androidx.core:core:1.8.0'
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
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')
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation "androidx.credentials:credentials:1.3.0"
implementation "androidx.credentials:credentials-play-services-auth:1.3.0"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
// Android Resolver Dependencies Start
implementation 'androidx.recyclerview:recyclerview:1.2.1' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:9
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
implementation 'com.applovin.mediation:bytedance-adapter:8.1.0.3.0' // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:mintegral-adapter:17.1.61.0' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:moloco-adapter:4.9.0.0' // Assets/MaxSdk/Mediation/Moloco/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:yandex-adapter:8.1.0.0' // Assets/MaxSdk/Mediation/Yandex/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
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**}
android {
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@@ -1,48 +0,0 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
def channelUnityProjectPath = $/**DIR_UNITYPROJECT**/$.replace("\\", "/")
include ':channel_manifest_lib'
project(':channel_manifest_lib').projectDir = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_manifest_lib')
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
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://artifact.bytedance.com/repository/pangle" // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
}
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
maven {
url "https://dl-maven-android.mintegral.com/repository/mbridge_android_sdk_oversea" // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
maven {
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
allowInsecureProtocol = true
}
}
}

View File

@@ -1,44 +0,0 @@
package com.unity3d.player;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class ChannelEntry {
public static final String CHANNEL = "Rustore";
public static SDKManager.IChannelSDKAdapter createSDKAdapter() {
return null;
}
public static String normalizeSkuList(String msg) {
if (msg == null || msg.isEmpty()) return msg;
try {
JSONArray products = new JSONArray(msg);
for (int i = 0; i < products.length(); i++) {
JSONObject p = products.getJSONObject(i);
// price is in kopecks, convert to micros: kopecks * 10000
String price = p.optString("price", "0");
long micros = Long.parseLong(price) * 10000;
p.put("price_amount_micros", String.valueOf(micros));
// Map currency → price_currency_code
String currency = p.optString("currency", "");
if (!currency.isEmpty()) {
p.put("price_currency_code", currency);
}
// Convert display price: "199" → "₽1.99"
float rubles = Float.parseFloat(price) / 100;
p.put("price", String.format("₽%s", rubles));
}
return products.toString();
} catch (JSONException e) {
Log.e("ChannelEntry", "normalizeSkuList error: " + e.getMessage());
return msg;
}
}
}

View File

@@ -1,29 +0,0 @@
package com.unity3d.player;
public class ConfigManager {
// Common SDK parameters
public static int SDK_APPID = 20587;
public static String SDK_GAMEID = "20587";
public static String SDK_PROJECTID = "20587";
public static String SDK_CLOUDID = "128";
public static String SDK_CLIENTID = "Android_5.00_tyGuest,facebook.googleplay.0-hall20587.rustore.FishingTravel";
public static String SDK_LOGIN_SERVER_URL = "https://128-hwsfsdk-sdk-online01.qijihdhk.com";
// FCM (anti-addiction system)
public static String FCM_NAMESPACE = "128";
public static String FCM_IAM_HOST = "tcp://fcmtcp.tuyoo.com:3563";
public static String FCM_ANTISERVERURL = "https://fcmapi.tuyoo.com";
// Unity Facade callback names
public static final String UNITY_FACADE_NAME = "TYSdkFacade";
public static final String LOGIN_CALLBACK_FUNCTION_NAME = "LoginResult";
public static final String LINKACCOUT_CALLBACK_FUNCTION_NAME = "LinkAccoutResult";
public static final String CHANGELINK_CALLBACK_FUNCTION_NAME = "ChangeLinkAccountResult";
public static final String CHECKLINK_CALLBACK_FUNCTION_NAME = "CheckLinkResult";
public static final String PAY_CALLBACK_FUNCTION_NAME = "PayResult";
public static final String PAY_TYPE_CALLBACK_FUNCTION_NAME = "SKUListResult";
public static final String FCM_NOTICE_FUNCTION_NAME = "FCMCallback";
public static final String FCM_REALNAME_CALLBACK_FUNCTION_NAME = "RealNameCallback";
public static final String INIT_CALLBACK_FUNCTION_NAME = "InitResult";
}

View File

@@ -1,14 +0,0 @@
plugins {
// If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
// See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
// See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
// To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
id 'com.android.application' version '7.4.2' apply false
id 'com.android.library' version '7.4.2' apply false
id 'com.google.gms.google-services' version '4.3.3' apply false
**BUILD_SCRIPT_DEPS**
}
task clean(type: Delete) {
delete rootProject.buildDir
}

View File

@@ -1,11 +0,0 @@
org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
# Android Resolver Properties Start
android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
android.suppressUnsupportedCompileSdk=35
**ADDITIONAL_PROPERTIES**

View File

@@ -1,74 +0,0 @@
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation project(':unityLibrary')
implementation platform('com.google.firebase:firebase-bom:34.6.0')
implementation 'com.google.firebase:firebase-analytics'
}
android {
namespace "**NAMESPACE**"
ndkPath "**NDKPATH**"
compileSdkVersion **APIVERSION**
buildToolsVersion '**BUILDTOOLS**'
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
defaultConfig {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
applicationId '**APPLICATIONID**'
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
// ↓↓↓ 这里放你的 VK ID 占位符 ↓↓↓
manifestPlaceholders = [
VKIDRedirectHost : "vk.ru",
VKIDRedirectScheme: "vk54432404",
VKIDClientID : "54432404",
VKIDClientSecret : "WD6BO0CwPXsKMaaFX8Qq"
]
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**SIGN**
lintOptions {
abortOnError false
}
buildTypes {
debug {
minifyEnabled **MINIFY_DEBUG**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
jniDebuggable true
}
release {
minifyEnabled **MINIFY_RELEASE**
proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
}
}**PACKAGING_OPTIONS****PLAY_ASSET_PACKS****SPLITS**
**BUILT_APK_LOCATION**
bundle {
language {
enableSplit = false
}
density {
enableSplit = false
}
abi {
enableSplit = true
}
}
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

View File

@@ -1,137 +0,0 @@
apply plugin: 'com.android.library'
**APPLY_PLUGINS**
// 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 {
namespace "com.unity3d.player"
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':channel_manifest_lib')
api "com.android.support:support-v4:28.0.0"
api "com.android.support:appcompat-v7:28.0.0"
api "com.google.code.gson:gson:2.8.6"
api "com.squareup.okio:okio:1.15.0"
api "com.squareup.okhttp3:okhttp:3.12.13"
api "com.squareup.retrofit2:retrofit:2.3.0"
api "com.squareup.retrofit2:converter-gson:2.2.0"
api "com.squareup.retrofit2:adapter-rxjava:2.1.0"
api "io.reactivex:rxandroid:1.2.1"
api "io.reactivex:rxjava:1.1.9"
// Google Play In-App Review
implementation 'com.google.android.play:review:2.0.1'
implementation 'net.aihelp:android-aihelp-aar:5.3.+'
implementation 'com.google.android.gms:play-services-auth:20.2.0'
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"
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.41'
implementation 'org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.3.41'
implementation 'androidx.core:core:1.8.0'
implementation 'com.miui.referrer:homereferrer:1.0.0.6'
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')
implementation 'com.google.android.play:asset-delivery:2.2.2'
implementation "androidx.credentials:credentials:1.3.0"
implementation "androidx.credentials:credentials-play-services-auth:1.3.0"
implementation "com.google.android.libraries.identity.googleid:googleid:1.1.1"
implementation(platform("ru.rustore.sdk:bom:2025.11.01"))
implementation("ru.rustore.sdk:pay")
implementation "ru.rustore.sdk:review:10.0.0"
implementation "com.vk.id:vkid:2.5.1"
coreLibraryDesugaring "com.android.tools:desugar_jdk_libs:2.1.2"
// Android Resolver Dependencies Start
implementation 'androidx.recyclerview:recyclerview:1.2.1' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:9
implementation 'com.android.installreferrer:installreferrer:2.1' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:7
implementation 'com.applovin.mediation:bytedance-adapter:8.1.0.3.0' // Assets/MaxSdk/Mediation/ByteDance/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:facebook-adapter:[6.18.0.1]' // Assets/MaxSdk/Mediation/Facebook/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:fyber-adapter:8.4.2.0' // Assets/MaxSdk/Mediation/Fyber/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:google-adapter:[23.6.0.1]' // Assets/MaxSdk/Mediation/Google/Editor/Dependencies.xml:5
implementation 'com.applovin.mediation:ironsource-adapter:8.6.1.0.0' // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:mintegral-adapter:17.1.61.0' // Assets/MaxSdk/Mediation/Mintegral/Editor/Dependencies.xml:8
implementation 'com.applovin.mediation:moloco-adapter:4.9.0.0' // Assets/MaxSdk/Mediation/Moloco/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:unityads-adapter:4.12.3.0' // Assets/MaxSdk/Mediation/UnityAds/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:vungle-adapter:7.4.2.2' // Assets/MaxSdk/Mediation/Vungle/Editor/Dependencies.xml:4
implementation 'com.applovin.mediation:yandex-adapter:8.1.0.0' // Assets/MaxSdk/Mediation/Yandex/Editor/Dependencies.xml:4
implementation 'com.applovin:applovin-sdk:13.5.1' // Assets/MaxSdk/AppLovin/Editor/Dependencies.xml:4
implementation 'com.appsflyer:af-android-sdk:6.17.3' // Assets/AppsFlyer/Editor/AppsFlyerDependencies.xml:5
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**}
// 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 {
minSdkVersion **MINSDKVERSION**
targetSdkVersion **TARGETSDKVERSION**
ndk {
abiFilters **ABIFILTERS**
}
versionCode **VERSIONCODE**
versionName '**VERSIONNAME**'
consumerProguardFiles 'proguard-unity.txt'**USER_PROGUARD**
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = **BUILTIN_NOCOMPRESS** + unityStreamingAssets.tokenize(', ')
ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:!CVS:!thumbs.db:!picasa.ini:!*~"
}**PACKAGING_OPTIONS**
}
**IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES**

View File

@@ -1,50 +0,0 @@
pluginManagement {
repositories {
**ARTIFACTORYREPOSITORY**
gradlePluginPortal()
google()
mavenCentral()
}
}
include ':launcher', ':unityLibrary'
**INCLUDES**
def channelUnityProjectPath = $/**DIR_UNITYPROJECT**/$.replace("\\", "/")
include ':channel_manifest_lib'
project(':channel_manifest_lib').projectDir = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_manifest_lib')
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
**ARTIFACTORYREPOSITORY**
google()
mavenCentral()
maven{
url "https://artifactory-external.vkpartner.ru/artifactory/vkid-sdk-android/"
}
maven{
url "https://artifactory-external.vkpartner.ru/artifactory/maven/"
}
maven{
url "https://artifactory-external.vkpartner.ru/artifactory/vk-id-captcha/android/"
}
// Android Resolver Repos Start
def unityProjectPath = $/file:///**DIR_UNITYPROJECT**/$.replace("\\", "/")
maven {
url "https://android-sdk.is.com/" // Assets/MaxSdk/Mediation/IronSource/Editor/Dependencies.xml:8
}
mavenLocal()
// Android Resolver Repos End
flatDir {
dirs "${project(':unityLibrary').projectDir}/libs"
}
maven {
url "http://sdkck.tuyoo.com/artifactory/tuyoo-component/"
allowInsecureProtocol = true
}
}
}

View File

@@ -19,6 +19,12 @@
# Asset meta data should only be ignored when the corresponding asset is also ignored # Asset meta data should only be ignored when the corresponding asset is also ignored
!/[Aa]ssets/**/*.meta !/[Aa]ssets/**/*.meta
# Channel build generated files
/[Aa]ssets/Plugins/Android/channel_gradle/
/[Aa]ssets/Plugins/Android/channel_gradle.meta
/[Aa]ssets/Plugins/Android/channel_manifest_lib/build/
/[Aa]ssets/Plugins/Android/channel_manifest_lib/build.meta
/AssetsBammbooooooGameShare.PNG /AssetsBammbooooooGameShare.PNG
# Uncomment this line if you wish to ignore the asset store tools plugin # Uncomment this line if you wish to ignore the asset store tools plugin

View File

@@ -8,7 +8,7 @@ using UnityEngine;
public class ChannelBuildTool public class ChannelBuildTool
{ {
private const string ExtraCfgRoot = "../ExtraPluginCfgs/Android"; private const string ChannelConfigRoot = "../ChannelConfigs/Android";
private const string TysdkPlugins = "Packages/tysdk/Plugins/Android"; private const string TysdkPlugins = "Packages/tysdk/Plugins/Android";
private const string TysdkFiles = "Packages/tysdk/Files"; private const string TysdkFiles = "Packages/tysdk/Files";
private const string AssetsPlugins = "Assets/Plugins/Android"; private const string AssetsPlugins = "Assets/Plugins/Android";
@@ -18,6 +18,8 @@ public class ChannelBuildTool
private const string DefaultProductName = "Fishing Travel"; private const string DefaultProductName = "Fishing Travel";
private const string EnjoyPayProductName = "Fishing Travel: Hook & Explore"; private const string EnjoyPayProductName = "Fishing Travel: Hook & Explore";
private const string ChannelManifestLib = "channel_manifest_lib"; private const string ChannelManifestLib = "channel_manifest_lib";
private const string ChannelGradle = "channel_gradle";
private const string ChannelMetaName = "com.arkgame.ft.channel";
private const string EmptyManifest = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" />\n"; private const string EmptyManifest = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" />\n";
private static readonly XNamespace AndroidNamespace = "http://schemas.android.com/apk/res/android"; private static readonly XNamespace AndroidNamespace = "http://schemas.android.com/apk/res/android";
private static readonly XNamespace ToolsNamespace = "http://schemas.android.com/tools"; private static readonly XNamespace ToolsNamespace = "http://schemas.android.com/tools";
@@ -27,11 +29,7 @@ public class ChannelBuildTool
public static void SwitchChannel(string channel) public static void SwitchChannel(string channel)
{ {
channel = NormalizeChannelName(channel); channel = NormalizeChannelName(channel);
var cfgDir = Path.Combine(ExtraCfgRoot, channel.ToLowerInvariant()); var cfgDir = Path.Combine(ChannelConfigRoot, channel.ToLowerInvariant());
if (!Directory.Exists(cfgDir))
{
throw new DirectoryNotFoundException($"[ChannelSwitch] Channel config not found: {cfgDir}");
}
Debug.Log($"[ChannelSwitch] Switching to {channel}..."); Debug.Log($"[ChannelSwitch] Switching to {channel}...");
CleanChannelManifestLibBuildArtifacts(); CleanChannelManifestLibBuildArtifacts();
@@ -43,41 +41,13 @@ public class ChannelBuildTool
SyncChannelAdapterFiles(cfgDir); SyncChannelAdapterFiles(cfgDir);
// 3. Sync google-services.json // 3. Sync google-services.json
var srcGoogleServices = Path.Combine(cfgDir, "Files/google-services.json"); SyncGoogleServices(cfgDir);
if (File.Exists(srcGoogleServices))
{
var destDir = Path.Combine(TysdkFiles);
if (!Directory.Exists(destDir)) Directory.CreateDirectory(destDir);
var destGoogleServices = Path.Combine(destDir, "google-services.json");
File.Copy(srcGoogleServices, destGoogleServices, true);
Debug.Log($"[ChannelSwitch] google-services.json -> {destGoogleServices}");
}
// 4. Sync channel plugin files (.aar, .jar, etc.) to tysdk package // 4. Sync channel plugin files (.aar, .jar, etc.) to tysdk package
var pluginsSrcDir = Path.Combine(cfgDir, "Plugins/Android"); SyncChannelPluginFiles(cfgDir);
var pluginsDestDir = TysdkPlugins;
if (Directory.Exists(pluginsSrcDir))
{
foreach (var oldPlugin in Directory.GetFiles(pluginsDestDir, "tuyoosdk_*.aar"))
File.Delete(oldPlugin);
foreach (var pluginFile in Directory.GetFiles(pluginsSrcDir))
{
if (pluginFile.EndsWith(".meta")) continue;
var fileName = Path.GetFileName(pluginFile);
var dest = Path.Combine(pluginsDestDir, fileName);
File.Copy(pluginFile, dest, true);
Debug.Log($"[ChannelSwitch] Plugin: {pluginFile} -> {dest}");
}
}
// 5. Set Bundle Identifier per channel // 5. Set Bundle Identifier per channel
var bundleId = channel switch var bundleId = GetBundleId(channel);
{
"Flexion" => "com.arkgame.ft.flexion",
"EnjoyPay" => "com.arkgame.ft.ep",
_ => "com.arkgame.ft"
};
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, bundleId); PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android, bundleId);
Debug.Log($"[ChannelSwitch] Bundle Identifier -> {bundleId}"); Debug.Log($"[ChannelSwitch] Bundle Identifier -> {bundleId}");
@@ -99,16 +69,22 @@ public class ChannelBuildTool
// ==================== Menu ==================== // ==================== Menu ====================
[MenuItem("Tools/Channel/Switch Channel/GooglePlay", false, 10000)] [MenuItem("Tools/Channel/Switch Channel/GooglePlay", false, 10000)]
public static void Switch_GooglePlay() => SwitchChannel("GooglePlay"); public static void Switch_GooglePlay() => SwitchChannelTo("GooglePlay");
[MenuItem("Tools/Channel/Switch Channel/Flexion", false, 10001)] [MenuItem("Tools/Channel/Switch Channel/Flexion", false, 10001)]
public static void Switch_Flexion() => SwitchChannel("Flexion"); public static void Switch_Flexion() => SwitchChannelTo("Flexion");
[MenuItem("Tools/Channel/Switch Channel/Rustore", false, 10002)] [MenuItem("Tools/Channel/Switch Channel/Rustore", false, 10002)]
public static void Switch_Rustore() => SwitchChannel("Rustore"); public static void Switch_Rustore() => SwitchChannelTo("Rustore");
[MenuItem("Tools/Channel/Switch Channel/EnjoyPay", false, 10003)] [MenuItem("Tools/Channel/Switch Channel/EnjoyPay", false, 10003)]
public static void Switch_EnjoyPay() => SwitchChannel("EnjoyPay"); public static void Switch_EnjoyPay() => SwitchChannelTo("EnjoyPay");
private static void SwitchChannelTo(string channel)
{
RestoreChannelWorkspace(skipOnCi: true);
SwitchChannel(channel);
}
// ==================== Build ==================== // ==================== Build ====================
@@ -116,6 +92,7 @@ public class ChannelBuildTool
{ {
try try
{ {
RestoreChannelWorkspace(skipOnCi: true);
CleanChannelManifestLibBuildArtifacts(); CleanChannelManifestLibBuildArtifacts();
SwitchChannel(channel); SwitchChannel(channel);
@@ -148,7 +125,7 @@ public class ChannelBuildTool
} }
finally finally
{ {
SwitchChannel("GooglePlay"); RestoreChannelWorkspace(skipOnCi: true);
AssetDatabase.SaveAssets(); AssetDatabase.SaveAssets();
} }
} }
@@ -177,6 +154,12 @@ public class ChannelBuildTool
[MenuItem("Tools/Channel/Build Android (Channel)/EnjoyPay Debug", false, 10107)] [MenuItem("Tools/Channel/Build Android (Channel)/EnjoyPay Debug", false, 10107)]
public static void Build_EnjoyPay_Debug() => BuildAndroidForChannel("EnjoyPay", true); public static void Build_EnjoyPay_Debug() => BuildAndroidForChannel("EnjoyPay", true);
[MenuItem("Tools/Channel/Restore Workspace (Git Checkout)", false, 10200)]
public static void RestoreChannelWorkspaceWithGitCheckoutMenu()
{
RestoreChannelWorkspace(skipOnCi: false);
}
private static string NormalizeChannelName(string channel) private static string NormalizeChannelName(string channel)
{ {
if (string.IsNullOrEmpty(channel)) if (string.IsNullOrEmpty(channel))
@@ -197,10 +180,65 @@ public class ChannelBuildTool
} }
} }
private static string GetBundleId(string channel)
{
return channel switch
{
"Flexion" => "com.arkgame.ft.flexion",
"EnjoyPay" => "com.arkgame.ft.ep",
_ => "com.arkgame.ft"
};
}
private static void RestoreChannelWorkspace(bool skipOnCi)
{
if (skipOnCi && IsCiBuild())
{
Debug.Log("[ChannelSwitch] Skip git checkout restore on CI.");
return;
}
RunCommand("git", "checkout -- .");
RunCommand("git", "clean -fd -- .");
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
Debug.Log("[ChannelSwitch] Workspace restored from git index.");
}
private static bool IsCiBuild()
{
return !string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("JENKINS_URL")) ||
!string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("JENKINS_HOME")) ||
!string.IsNullOrEmpty(System.Environment.GetEnvironmentVariable("BUILD_NUMBER"));
}
private static void RunCommand(string fileName, string arguments)
{
var startInfo = new System.Diagnostics.ProcessStartInfo
{
FileName = fileName,
Arguments = arguments,
UseShellExecute = false,
RedirectStandardOutput = true,
RedirectStandardError = true,
CreateNoWindow = true
};
using (var process = System.Diagnostics.Process.Start(startInfo))
{
var output = process.StandardOutput.ReadToEnd();
var error = process.StandardError.ReadToEnd();
process.WaitForExit();
if (process.ExitCode != 0)
{
throw new System.InvalidOperationException($"{fileName} {arguments} failed.\n{output}\n{error}");
}
}
}
private static void SyncRootAndroidConfigFiles(string channel, string cfgDir) private static void SyncRootAndroidConfigFiles(string channel, string cfgDir)
{ {
CopyRootConfigFiles(cfgDir, "*.gradle"); SyncChannelGradleFiles(channel, cfgDir);
CopyRootConfigFiles(cfgDir, "*.properties");
SetMainManifestChannel(channel); SetMainManifestChannel(channel);
SyncChannelManifestLib(channel, cfgDir); SyncChannelManifestLib(channel, cfgDir);
} }
@@ -214,6 +252,11 @@ public class ChannelBuildTool
File.Delete(oldJava); File.Delete(oldJava);
} }
if (!Directory.Exists(cfgDir))
{
return;
}
foreach (var javaFile in Directory.GetFiles(cfgDir, "*Adapter.java")) foreach (var javaFile in Directory.GetFiles(cfgDir, "*Adapter.java"))
{ {
var fileName = Path.GetFileName(javaFile); var fileName = Path.GetFileName(javaFile);
@@ -223,10 +266,50 @@ public class ChannelBuildTool
} }
} }
private static void SyncGoogleServices(string cfgDir)
{
var dest = Path.Combine(TysdkFiles, "google-services.json");
var src = Path.Combine(cfgDir, "Files", "google-services.json");
if (!File.Exists(src))
{
Debug.Log($"[ChannelSwitch] google-services.json not copied. Checked={src}");
return;
}
var destDir = Path.GetDirectoryName(dest);
if (!Directory.Exists(destDir)) Directory.CreateDirectory(destDir);
File.Copy(src, dest, true);
Debug.Log($"[ChannelSwitch] google-services.json -> {dest}");
}
private static void SyncChannelPluginFiles(string cfgDir)
{
var pluginsSrcDir = Path.Combine(cfgDir, "Plugins", "Android");
if (!Directory.Exists(pluginsSrcDir))
{
Debug.Log($"[ChannelSwitch] Plugin directory not found. Checked={pluginsSrcDir}");
return;
}
foreach (var oldPlugin in Directory.GetFiles(TysdkPlugins, "tuyoosdk_*.aar"))
{
File.Delete(oldPlugin);
}
foreach (var pluginFile in Directory.GetFiles(pluginsSrcDir))
{
if (pluginFile.EndsWith(".meta")) continue;
var fileName = Path.GetFileName(pluginFile);
var dest = Path.Combine(TysdkPlugins, fileName);
File.Copy(pluginFile, dest, true);
Debug.Log($"[ChannelSwitch] Plugin: {pluginFile} -> {dest}");
}
}
private static void SyncChannelManifestLib(string channel, string cfgDir) private static void SyncChannelManifestLib(string channel, string cfgDir)
{ {
var dest = Path.Combine(AssetsPlugins, ChannelManifestLib, "src"); var dest = Path.Combine(AssetsPlugins, ChannelManifestLib, "src");
if (channel == "GooglePlay") if (channel == "GooglePlay" || !Directory.Exists(cfgDir))
{ {
WriteEmptyChannelManifestLib(dest); WriteEmptyChannelManifestLib(dest);
Debug.Log($"[ChannelSwitch] Manifest lib reset to empty default. Channel={channel}"); Debug.Log($"[ChannelSwitch] Manifest lib reset to empty default. Channel={channel}");
@@ -243,6 +326,31 @@ public class ChannelBuildTool
Debug.Log($"[ChannelSwitch] Manifest: {srcManifest} -> {Path.Combine(dest, "main", "AndroidManifest.xml")}"); Debug.Log($"[ChannelSwitch] Manifest: {srcManifest} -> {Path.Combine(dest, "main", "AndroidManifest.xml")}");
} }
private static void SyncChannelGradleFiles(string channel, string cfgDir)
{
var src = Path.Combine(cfgDir, "Plugins", "Android", "gradle");
var dest = Path.Combine(AssetsPlugins, ChannelGradle);
if (Directory.Exists(dest))
{
Directory.Delete(dest, true);
}
var destMeta = dest + ".meta";
if (File.Exists(destMeta))
{
File.Delete(destMeta);
}
if (!Directory.Exists(src))
{
Debug.Log($"[ChannelSwitch] Gradle increment reset to empty default. Channel={channel}");
return;
}
CopyDirectoryClean(src, dest);
Debug.Log($"[ChannelSwitch] Gradle increment: {src} -> {dest}");
}
private static void SetMainManifestChannel(string channel) private static void SetMainManifestChannel(string channel)
{ {
var manifestPath = Path.Combine(AssetsPlugins, "AndroidManifest.xml"); var manifestPath = Path.Combine(AssetsPlugins, "AndroidManifest.xml");
@@ -259,23 +367,31 @@ public class ChannelBuildTool
throw new InvalidDataException($"[ChannelSwitch] Main AndroidManifest application node not found: {manifestPath}"); throw new InvalidDataException($"[ChannelSwitch] Main AndroidManifest application node not found: {manifestPath}");
} }
var channelMeta = application.Elements() root.SetAttributeValue("package", GetBundleId(channel));
.FirstOrDefault(x => x.Name.LocalName == "meta-data" && SetMainManifestChannelMeta(application, channel);
(string)x.Attribute(AndroidNamespace + "name") == "com.arkgame.ft.channel");
if (channelMeta == null)
{
channelMeta = new XElement("meta-data",
new XAttribute(AndroidNamespace + "name", "com.arkgame.ft.channel"));
application.Add(channelMeta);
}
channelMeta.SetAttributeValue(AndroidNamespace + "value", channel);
SetMainManifestBackupRules(application, channel); SetMainManifestBackupRules(application, channel);
doc.Save(manifestPath); doc.Save(manifestPath);
AssetDatabase.ImportAsset(manifestPath, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate); AssetDatabase.ImportAsset(manifestPath, ImportAssetOptions.ForceSynchronousImport | ImportAssetOptions.ForceUpdate);
Debug.Log($"[ChannelSwitch] Main manifest channel -> {channel}"); Debug.Log($"[ChannelSwitch] Main manifest channel -> {channel}");
} }
private static void SetMainManifestChannelMeta(XElement application, string channel)
{
var channelMeta = application.Elements()
.FirstOrDefault(x => x.Name.LocalName == "meta-data" &&
(string)x.Attribute(AndroidNamespace + "name") == ChannelMetaName);
if (channelMeta == null)
{
channelMeta = new XElement("meta-data",
new XAttribute(AndroidNamespace + "name", ChannelMetaName));
application.Add(channelMeta);
}
channelMeta.SetAttributeValue(AndroidNamespace + "name", ChannelMetaName);
channelMeta.SetAttributeValue(AndroidNamespace + "value", channel);
}
private static void SetMainManifestBackupRules(XElement application, string channel) private static void SetMainManifestBackupRules(XElement application, string channel)
{ {
const string fullBackupContent = "android:fullBackupContent"; const string fullBackupContent = "android:fullBackupContent";
@@ -348,22 +464,6 @@ public class ChannelBuildTool
} }
} }
private static void CopyRootConfigFiles(string cfgDir, string searchPattern)
{
foreach (var src in Directory.GetFiles(cfgDir, searchPattern, SearchOption.TopDirectoryOnly))
{
CopyRootConfigFile(src);
}
}
private static void CopyRootConfigFile(string src)
{
var fileName = Path.GetFileName(src);
var dest = Path.Combine(AssetsPlugins, fileName);
File.Copy(src, dest, true);
Debug.Log($"[ChannelSwitch] Config: {src} -> {dest}");
}
private static void CopyDirectoryClean(string src, string dest) private static void CopyDirectoryClean(string src, string dest)
{ {
if (Directory.Exists(dest)) if (Directory.Exists(dest))
@@ -414,11 +514,12 @@ public class ChannelBuildTool
if (!File.Exists(src) && UsesRustoreAddressablesContentState(channel)) if (!File.Exists(src) && UsesRustoreAddressablesContentState(channel))
{ {
Debug.Log($"[ChannelSwitch] Channel content state not found, try legacy Rustore content state path. Channel={channel}, checked={src}"); Debug.Log($"[ChannelSwitch] Channel content state not found, try legacy Rustore content state path. Channel={channel}, checked={src}");
src = Path.Combine("../ExtraPluginCfgs", AddressablesContentState); src = Path.Combine("../ChannelConfigs", AddressablesContentState);
} }
if (!File.Exists(src)) if (!File.Exists(src))
{ {
ClearAddressablesContentState(channel);
Debug.Log($"[ChannelSwitch] Addressables content state not copied. Channel={channel}, checked={src}"); Debug.Log($"[ChannelSwitch] Addressables content state not copied. Channel={channel}, checked={src}");
return; return;
} }
@@ -430,6 +531,34 @@ public class ChannelBuildTool
Debug.Log($"[ChannelSwitch] Addressables content state: {src} -> {AndroidAddressablesContentState}"); Debug.Log($"[ChannelSwitch] Addressables content state: {src} -> {AndroidAddressablesContentState}");
} }
private static void ClearAddressablesContentState(string channel)
{
if (File.Exists(AndroidAddressablesContentState))
{
File.Delete(AndroidAddressablesContentState);
}
var meta = AndroidAddressablesContentState + ".meta";
if (File.Exists(meta))
{
File.Delete(meta);
}
var dir = Path.GetDirectoryName(AndroidAddressablesContentState);
if (Directory.Exists(dir) && !Directory.EnumerateFileSystemEntries(dir).Any())
{
Directory.Delete(dir);
}
var dirMeta = dir + ".meta";
if (File.Exists(dirMeta) && !Directory.Exists(dir))
{
File.Delete(dirMeta);
}
Debug.Log($"[ChannelSwitch] Addressables content state cleared. Channel={channel}");
}
private static bool UsesRustoreAddressablesContentState(string channel) private static bool UsesRustoreAddressablesContentState(string channel)
{ {
return channel == "Rustore" || channel == "EnjoyPay"; return channel == "Rustore" || channel == "EnjoyPay";

View File

@@ -27,7 +27,8 @@
<meta-data android:name="google_analytics_default_allow_ad_user_data" 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" /> <meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="true" />
</activity> </activity>
<meta-data android:name="com.arkgame.ft.channel" android:value="GooglePlay" /> <meta-data android:name="com.arkgame.ft.channel" android:value="tw" />
<meta-data android:name="CHANNEL" android:value="tw" />
</application> </application>
<queries> <queries>
<provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> <provider android:authorities="com.facebook.katana.provider.PlatformProvider" />

View File

@@ -1,2 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" /> <manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<application>
</application>
</manifest>

View File

@@ -115,3 +115,9 @@ android {
**IL_CPP_BUILD_SETUP** **IL_CPP_BUILD_SETUP**
**SOURCE_BUILD_SETUP** **SOURCE_BUILD_SETUP**
**EXTERNAL_SOURCES** **EXTERNAL_SOURCES**
def channelUnityProjectPath = $/**DIR_UNITYPROJECT**/$.replace("\\", "/")
def channelGradleMain = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_gradle/main.gradle')
if (channelGradleMain.exists()) {
apply from: channelGradleMain
}

View File

@@ -14,6 +14,11 @@ def channelUnityProjectPath = $/**DIR_UNITYPROJECT**/$.replace("\\", "/")
include ':channel_manifest_lib' include ':channel_manifest_lib'
project(':channel_manifest_lib').projectDir = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_manifest_lib') project(':channel_manifest_lib').projectDir = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_manifest_lib')
def channelGradleSettings = new File(channelUnityProjectPath, 'Assets/Plugins/Android/channel_gradle/settings.gradle')
if (channelGradleSettings.exists()) {
apply from: channelGradleSettings
}
dependencyResolutionManagement { dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS) repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories { repositories {