@leonxin/meetgames 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/dist/cache.d.ts +44 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +101 -0
- package/dist/cache.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +43 -37
- package/dist/cli.js.map +1 -1
- package/dist/config/meetSdkDefaultConfig.d.ts +1 -1
- package/dist/config/meetSdkDefaultConfig.d.ts.map +1 -1
- package/dist/config/meetSdkDefaultConfig.js +4 -3
- package/dist/config/meetSdkDefaultConfig.js.map +1 -1
- package/dist/config/meetSdkIosConfig.d.ts.map +1 -1
- package/dist/config/meetSdkIosConfig.js +3 -1
- package/dist/config/meetSdkIosConfig.js.map +1 -1
- package/dist/config/meetSdkRemoteConfig.d.ts +1 -0
- package/dist/config/meetSdkRemoteConfig.d.ts.map +1 -1
- package/dist/config/meetSdkRemoteConfig.js +4 -1
- package/dist/config/meetSdkRemoteConfig.js.map +1 -1
- package/dist/contracts/types.d.ts +8 -0
- package/dist/contracts/types.d.ts.map +1 -1
- package/dist/core/doctor.js +7 -7
- package/dist/core/doctor.js.map +1 -1
- package/dist/core/previewPatches.d.ts +1 -1
- package/dist/core/previewPatches.js +2 -2
- package/dist/core/previewPatches.js.map +1 -1
- package/dist/core/workspace.d.ts.map +1 -1
- package/dist/core/workspace.js +2 -0
- package/dist/core/workspace.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/ios/integrate.d.ts.map +1 -1
- package/dist/ios/integrate.js +3 -3
- package/dist/ios/integrate.js.map +1 -1
- package/dist/ios/pbxprojEditor.d.ts.map +1 -1
- package/dist/ios/pbxprojEditor.js +71 -5
- package/dist/ios/pbxprojEditor.js.map +1 -1
- package/dist/ios/sdkBundle.d.ts +1 -6
- package/dist/ios/sdkBundle.d.ts.map +1 -1
- package/dist/ios/sdkBundle.js +44 -16
- package/dist/ios/sdkBundle.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +12 -6
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/service.d.ts +3 -0
- package/dist/mcp/service.d.ts.map +1 -1
- package/dist/mcp/service.js +31 -8
- package/dist/mcp/service.js.map +1 -1
- package/dist/ops/handlers.d.ts.map +1 -1
- package/dist/ops/handlers.js +24 -19
- package/dist/ops/handlers.js.map +1 -1
- package/dist/remote/sdkHomeDownload.d.ts +1 -1
- package/dist/remote/sdkHomeDownload.d.ts.map +1 -1
- package/dist/remote/sdkHomeDownload.js +27 -6
- package/dist/remote/sdkHomeDownload.js.map +1 -1
- package/docs/API.md +16 -16
- package/docs/CLI.md +21 -22
- package/docs/INTEGRATION.md +11 -11
- package/docs/MCP.md +1 -1
- package/docs/README.md +0 -1
- package/docs/archive/api/downloadSDKConfig.md +2 -2
- package/docs/archive/api/getChannelConfig-meetgames.md +1 -1
- package/docs/archive/product//351/234/200/346/261/202/346/226/207/346/241/243.md +1 -1
- package/package.json +2 -5
- package/recipes/android-default.yaml +0 -5
- package/recipes/integrate-default.yaml +0 -5
- package/src/cache.ts +164 -0
- package/src/cli.ts +46 -38
- package/src/config/meetSdkDefaultConfig.ts +4 -3
- package/src/config/meetSdkIosConfig.ts +3 -1
- package/src/config/meetSdkRemoteConfig.ts +5 -1
- package/src/contracts/types.ts +8 -0
- package/src/core/doctor.ts +7 -7
- package/src/core/previewPatches.ts +2 -2
- package/src/core/workspace.ts +2 -0
- package/src/index.ts +7 -0
- package/src/ios/integrate.ts +4 -3
- package/src/ios/pbxprojEditor.ts +70 -3
- package/src/ios/sdkBundle.ts +41 -18
- package/src/mcp/server.ts +12 -6
- package/src/mcp/service.ts +39 -8
- package/src/ops/handlers.ts +23 -19
- package/src/remote/sdkHomeDownload.ts +28 -7
- package/tests/doctor.test.ts +4 -2
- package/tests/{test-projects-hosts.test.ts → fixtures-hosts.test.ts} +2 -2
- package/tests/ios.sdkBundle.test.ts +10 -5
- package/tests/mcp.e2e.ts +2 -5
- package/tests/meetSdkRemoteConfig.test.ts +25 -0
- package/tests/pipeline.android.test.ts +1 -2
- package/tests/pipeline.ios.test.ts +26 -19
- package/tests/pipeline.preview.patch.test.ts +2 -2
- package/tests/sdkVersionConfig.test.ts +3 -2
- package/dist/aab-converter/aab-entry.d.ts +0 -3
- package/dist/aab-converter/aab-entry.d.ts.map +0 -1
- package/dist/aab-converter/aab-entry.js +0 -49
- package/dist/aab-converter/aab-entry.js.map +0 -1
- package/dist/aab-converter/apksExtractor.d.ts +0 -2
- package/dist/aab-converter/apksExtractor.d.ts.map +0 -1
- package/dist/aab-converter/apksExtractor.js +0 -108
- package/dist/aab-converter/apksExtractor.js.map +0 -1
- package/dist/aab-converter/bundletoolRunner.d.ts +0 -15
- package/dist/aab-converter/bundletoolRunner.d.ts.map +0 -1
- package/dist/aab-converter/bundletoolRunner.js +0 -46
- package/dist/aab-converter/bundletoolRunner.js.map +0 -1
- package/dist/aab-converter/cliArgs.d.ts +0 -27
- package/dist/aab-converter/cliArgs.d.ts.map +0 -1
- package/dist/aab-converter/cliArgs.js +0 -170
- package/dist/aab-converter/cliArgs.js.map +0 -1
- package/dist/aab-converter/convertAabToApk.d.ts +0 -7
- package/dist/aab-converter/convertAabToApk.d.ts.map +0 -1
- package/dist/aab-converter/convertAabToApk.js +0 -69
- package/dist/aab-converter/convertAabToApk.js.map +0 -1
- package/dist/aab-converter/resourcePaths.d.ts +0 -4
- package/dist/aab-converter/resourcePaths.d.ts.map +0 -1
- package/dist/aab-converter/resourcePaths.js +0 -42
- package/dist/aab-converter/resourcePaths.js.map +0 -1
- package/dist/aab-converter/signingOptions.d.ts +0 -9
- package/dist/aab-converter/signingOptions.d.ts.map +0 -1
- package/dist/aab-converter/signingOptions.js +0 -21
- package/dist/aab-converter/signingOptions.js.map +0 -1
- package/dist/aab-converter/types.d.ts +0 -24
- package/dist/aab-converter/types.d.ts.map +0 -1
- package/dist/aab-converter/types.js +0 -2
- package/dist/aab-converter/types.js.map +0 -1
- package/dist/shared/fileUtils.d.ts +0 -5
- package/dist/shared/fileUtils.d.ts.map +0 -1
- package/dist/shared/fileUtils.js +0 -35
- package/dist/shared/fileUtils.js.map +0 -1
- package/dist/shared/logger.d.ts +0 -10
- package/dist/shared/logger.d.ts.map +0 -1
- package/dist/shared/logger.js +0 -37
- package/dist/shared/logger.js.map +0 -1
- package/dist/shared/pathUtils.d.ts +0 -4
- package/dist/shared/pathUtils.d.ts.map +0 -1
- package/dist/shared/pathUtils.js +0 -22
- package/dist/shared/pathUtils.js.map +0 -1
- package/dist/shared/processRunner.d.ts +0 -12
- package/dist/shared/processRunner.d.ts.map +0 -1
- package/dist/shared/processRunner.js +0 -31
- package/dist/shared/processRunner.js.map +0 -1
- package/docs/AAB_CONVERTER_CLI_PLAN.md +0 -392
- package/logs/convert-20260622-155037.log +0 -5
- package/logs/convert-20260622-155226.log +0 -6
- package/scripts/package-aab-cli-win.mjs +0 -193
- package/src/aab-converter/aab-entry.ts +0 -48
- package/src/aab-converter/apksExtractor.ts +0 -119
- package/src/aab-converter/bundletoolRunner.ts +0 -63
- package/src/aab-converter/cliArgs.ts +0 -194
- package/src/aab-converter/convertAabToApk.ts +0 -81
- package/src/aab-converter/resourcePaths.ts +0 -43
- package/src/aab-converter/signingOptions.ts +0 -29
- package/src/aab-converter/types.ts +0 -26
- package/src/shared/fileUtils.ts +0 -41
- package/src/shared/logger.ts +0 -49
- package/src/shared/pathUtils.ts +0 -24
- package/src/shared/processRunner.ts +0 -43
- package/test-projects/README.md +0 -51
- package/test-projects/_preview/pipeline.patch +0 -281
- package/tests/aab-converter.test.ts +0 -213
- /package/{meetsdk-android.json → config/meetsdk-android.json} +0 -0
- /package/{meetsdk-ios.json → config/meetsdk-ios.json} +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { spawn } from "node:child_process";
|
|
2
|
-
|
|
3
|
-
export interface RunProcessOptions {
|
|
4
|
-
cwd?: string;
|
|
5
|
-
onStdout?: (chunk: string) => void;
|
|
6
|
-
onStderr?: (chunk: string) => void;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface RunProcessResult {
|
|
10
|
-
exitCode: number;
|
|
11
|
-
stdout: string;
|
|
12
|
-
stderr: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function runProcess(file: string, args: string[], options: RunProcessOptions = {}): Promise<RunProcessResult> {
|
|
16
|
-
return new Promise((resolve, reject) => {
|
|
17
|
-
const child = spawn(file, args, {
|
|
18
|
-
cwd: options.cwd,
|
|
19
|
-
windowsHide: true,
|
|
20
|
-
shell: false,
|
|
21
|
-
});
|
|
22
|
-
let stdout = "";
|
|
23
|
-
let stderr = "";
|
|
24
|
-
child.stdout?.on("data", (buf: Buffer) => {
|
|
25
|
-
const text = buf.toString("utf8");
|
|
26
|
-
stdout += text;
|
|
27
|
-
options.onStdout?.(text);
|
|
28
|
-
});
|
|
29
|
-
child.stderr?.on("data", (buf: Buffer) => {
|
|
30
|
-
const text = buf.toString("utf8");
|
|
31
|
-
stderr += text;
|
|
32
|
-
options.onStderr?.(text);
|
|
33
|
-
});
|
|
34
|
-
child.on("error", reject);
|
|
35
|
-
child.on("close", (exitCode) => {
|
|
36
|
-
resolve({
|
|
37
|
-
exitCode: exitCode ?? 1,
|
|
38
|
-
stdout,
|
|
39
|
-
stderr,
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
}
|
package/test-projects/README.md
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
# Test preview output
|
|
2
|
-
|
|
3
|
-
`test-projects/` no longer stores host project fixtures. Runtime test projects live under `fixtures/`:
|
|
4
|
-
|
|
5
|
-
- `fixtures/android-test-project/android-latest-project/`
|
|
6
|
-
- `fixtures/android-test-project/power-raid/`
|
|
7
|
-
- `fixtures/ios-test-project/tooltest/`
|
|
8
|
-
|
|
9
|
-
`test-projects/_preview/` is kept only for generated dry-run patch output. Running **`npm test`** refreshes **`test-projects/_preview/pipeline.patch`**; fixture source trees are not modified by tests.
|
|
10
|
-
|
|
11
|
-
## Preview changes (`--dry-run`)
|
|
12
|
-
|
|
13
|
-
**`integrate` writes to disk by default.** Use **`--dry-run`** to preview diffs without touching host projects:
|
|
14
|
-
|
|
15
|
-
1. **`npm test`** — writes **`test-projects/_preview/pipeline.patch`** (yaml + integration-json fixture dry-runs on `fixtures/android-test-project/android-latest-project`).
|
|
16
|
-
|
|
17
|
-
2. **Manual dry-run**:
|
|
18
|
-
```bash
|
|
19
|
-
npm run build -s
|
|
20
|
-
node dist/entry.js integrate --project-root fixtures/android-test-project/android-latest-project \
|
|
21
|
-
--dry-run --verbose --patch-file ./meetgames-preview.patch
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
`test-projects/_preview/` is gitignored. Writing **`--patch-file`** into that directory clears existing files there first.
|
|
25
|
-
|
|
26
|
-
## Primary test hosts
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
cd /path/to/meet-sdk-tool
|
|
30
|
-
node dist/entry.js doctor --project-root fixtures/android-test-project/android-latest-project
|
|
31
|
-
node dist/entry.js doctor --project-root fixtures/android-test-project/power-raid
|
|
32
|
-
node dist/entry.js integrate --project-root fixtures/android-test-project/android-latest-project --dry-run --verbose
|
|
33
|
-
node dist/entry.js integrate --project-root fixtures/android-test-project/power-raid --dry-run --verbose
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### `android-latest-project/`
|
|
37
|
-
|
|
38
|
-
- Modern template: `plugins { alias(libs.plugins…) }`, `dependencyResolutionManagement` in `settings.gradle`.
|
|
39
|
-
- Single **`app`** module (`com.android.application`).
|
|
40
|
-
- `meetsdk-remote-config.json` — test/联调配置(`fetch-config` 可覆盖)。
|
|
41
|
-
|
|
42
|
-
### `power-raid/`
|
|
43
|
-
|
|
44
|
-
- Unity Android export: **`launcher`** + `unityLibrary`, `engine=unity`.
|
|
45
|
-
- Legacy `apply plugin` + existing TOPSDK marker blocks (re-integrate / upsert).
|
|
46
|
-
- `meetsdk-remote-config.json` — 与线上一致的插件 key 集合。
|
|
47
|
-
|
|
48
|
-
### `fixtures/ios-test-project/tooltest/`
|
|
49
|
-
|
|
50
|
-
- Xcode test host for iOS pipeline and platform-detection tests.
|
|
51
|
-
- Uses `fixtures/meetsdk-remote-config.ios-tooltest.json` as its offline remote-config fixture.
|
|
@@ -1,281 +0,0 @@
|
|
|
1
|
-
# dry-run — fixtures/recipes/android-default.fixture.yaml
|
|
2
|
-
diff --git a/app/build.gradle b/app/build.gradle
|
|
3
|
-
index ba437dd..b97390c 100644
|
|
4
|
-
--- a/app/build.gradle
|
|
5
|
-
+++ b/app/build.gradle
|
|
6
|
-
@@ -1,6 +1,9 @@
|
|
7
|
-
plugins {
|
|
8
|
-
alias(libs.plugins.android.application)
|
|
9
|
-
alias(libs.plugins.kotlin.compose)
|
|
10
|
-
+ // >>> TOPSDK PLUGIN AUTO START
|
|
11
|
-
+ id 'com.google.gms.google-services'
|
|
12
|
-
+ // >>> TOPSDK PLUGIN AUTO END
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
android {
|
|
16
|
-
@@ -10,14 +13,42 @@ android {
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
defaultConfig {
|
|
20
|
-
- applicationId "com.example.myapplication"
|
|
21
|
-
+ applicationId "com.meet.integrate.androidsample"
|
|
22
|
-
minSdk 24
|
|
23
|
-
targetSdk 36
|
|
24
|
-
versionCode 1
|
|
25
|
-
versionName "1.0"
|
|
26
|
-
|
|
27
|
-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
28
|
-
- }
|
|
29
|
-
+ // >>> TOPSDK AUTO START
|
|
30
|
-
+ resValue('string', 'top_channel_id', 'GOOGLE')
|
|
31
|
-
+ resValue('string', 'top_app_id', 'mock-topsdk-app-id')
|
|
32
|
-
+ resValue('string', 'facebook_app_id', '0000000000000000')
|
|
33
|
-
+ resValue('string', 'fb_login_protocol_scheme', 'fb0000000000000000')
|
|
34
|
-
+ resValue('string', 'facebook_client_token', 'mockfacebookclienttoken00000000')
|
|
35
|
-
+ resValue('string', 'google_client_id', 'mock-client-id.apps.googleusercontent.com')
|
|
36
|
-
+ resValue('string', 'twitter_client_id', 'MOCK_TWITTER_OAUTH2_CLIENT_ID')
|
|
37
|
-
+ resValue('string', 'twitter_client_secret', 'MOCK_TWITTER_OAUTH2_CLIENT_SECRET')
|
|
38
|
-
+ resValue('string', 'twitter_redirect_url', 'com.feishu.topsdk://callback')
|
|
39
|
-
+ resValue('string', 'snapchat_client_id', 'MOCK_SNAPCHAT_CLIENT_ID_UUID')
|
|
40
|
-
+ resValue('string', 'snapchat_redirect_uri', 'https://com.feishu.topsdk/snapchat/callback')
|
|
41
|
-
+ resValue('string', 'tiktok_client_id', 'MOCK_TIKTOK_CLIENT_KEY')
|
|
42
|
-
+ resValue('string', 'tiktok_client_secret', 'MOCK_TIKTOK_CLIENT_SECRET')
|
|
43
|
-
+ resValue('string', 'tiktok_redirect_uri', 'https://example.invalid/tiktok/oauth/callback')
|
|
44
|
-
+ resValue('string', 'line_channel_id', 'MOCK_LINE_CHANNEL_ID')
|
|
45
|
-
+ resValue('string', 'kakao_app_id', 'MOCK_KAKAO_NATIVE_APP_KEY')
|
|
46
|
-
+ resValue('string', 'kakao_scheme', 'kakaoMOCK_KAKAO_NATIVE_APP_KEY')
|
|
47
|
-
+ resValue('string', 'naver_client_id', 'MOCK_NAVER_CLIENT_ID')
|
|
48
|
-
+ resValue('string', 'naver_client_secret', 'MOCK_NAVER_CLIENT_SECRET')
|
|
49
|
-
+ resValue('string', 'naver_client_name', 'Android Sample')
|
|
50
|
-
+ resValue('bool', 'appsflyer_enable_debug_log', "true")
|
|
51
|
-
+ resValue('string', 'af_dev_key', 'MOCK_APPSFLYER_DEV_KEY')
|
|
52
|
-
+ resValue('bool', 'adjust_enable_sandbox', "false")
|
|
53
|
-
+ resValue('string', 'adjust_app_token', 'MOCK_ADJUST_APP_ID')
|
|
54
|
-
+ resValue('string', 'facebook_data_app_id', '0000000000000000')
|
|
55
|
-
+ resValue('string', 'facebook_data_client_token', 'mockfacebookclienttoken00000000')
|
|
56
|
-
+// >>> TOPSDK AUTO END
|
|
57
|
-
+}
|
|
58
|
-
|
|
59
|
-
buildTypes {
|
|
60
|
-
release {
|
|
61
|
-
@@ -50,4 +81,28 @@ dependencies {
|
|
62
|
-
androidTestImplementation libs.androidx.compose.ui.test.junit4
|
|
63
|
-
debugImplementation libs.androidx.compose.ui.tooling
|
|
64
|
-
debugImplementation libs.androidx.compose.ui.test.manifest
|
|
65
|
-
+// >>> TOPSDK AUTO START
|
|
66
|
-
+ def topsdk_version = "1.6.1.3"
|
|
67
|
-
+ def groupId = "com.sino.topsdk"
|
|
68
|
-
+
|
|
69
|
-
+ implementation "$groupId:ui:$topsdk_version"
|
|
70
|
-
+ implementation "$groupId:guest:$topsdk_version"
|
|
71
|
-
+ implementation "$groupId:email:$topsdk_version"
|
|
72
|
-
+ implementation "$groupId:facebook:$topsdk_version"
|
|
73
|
-
+ implementation "$groupId:google:$topsdk_version"
|
|
74
|
-
+ implementation "$groupId:twitter:$topsdk_version"
|
|
75
|
-
+ implementation "$groupId:snapchat:$topsdk_version"
|
|
76
|
-
+ implementation "$groupId:line:$topsdk_version"
|
|
77
|
-
+ implementation "$groupId:naver:$topsdk_version"
|
|
78
|
-
+ implementation "$groupId:kakao:$topsdk_version"
|
|
79
|
-
+ implementation "$groupId:tiktok:$topsdk_version"
|
|
80
|
-
+ implementation "$groupId:appsflyer:$topsdk_version"
|
|
81
|
-
+ implementation "$groupId:firebase:$topsdk_version"
|
|
82
|
-
+ implementation "$groupId:adjust:$topsdk_version"
|
|
83
|
-
+ implementation "$groupId:facebook-data:$topsdk_version"
|
|
84
|
-
+ implementation "$groupId:google-iap:$topsdk_version"
|
|
85
|
-
+ implementation "$groupId:onestore-iap:$topsdk_version"
|
|
86
|
-
+ implementation "$groupId:huawei-iap:$topsdk_version"
|
|
87
|
-
+ implementation "$groupId:xiaomi-iap:$topsdk_version"
|
|
88
|
-
+// >>> TOPSDK AUTO END
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
diff --git a/settings.gradle b/settings.gradle
|
|
92
|
-
index 437187c..a7deb33 100644
|
|
93
|
-
--- a/settings.gradle
|
|
94
|
-
+++ b/settings.gradle
|
|
95
|
-
@@ -14,9 +14,16 @@ pluginManagement {
|
|
96
|
-
dependencyResolutionManagement {
|
|
97
|
-
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
98
|
-
repositories {
|
|
99
|
-
- google()
|
|
100
|
-
+ // >>> TOPSDK REPO AUTO START
|
|
101
|
-
+ maven { url 'https://devrepo.kakao.com/nexus/content/groups/public/' }
|
|
102
|
-
+ maven { url 'https://artifact.bytedance.com/repository/AwemeOpenSDK' }
|
|
103
|
-
mavenCentral()
|
|
104
|
-
- }
|
|
105
|
-
+ google()
|
|
106
|
-
+ maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public/' }
|
|
107
|
-
+ maven { url 'https://developer.huawei.com/repo/' }
|
|
108
|
-
+ maven { url 'https://storage-sdk-gameplus.meetsocial.com/repository/TopSdk/' }
|
|
109
|
-
+// >>> TOPSDK REPO AUTO END
|
|
110
|
-
+}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
rootProject.name = "My Application"
|
|
114
|
-
|
|
115
|
-
diff --git a/build.gradle b/build.gradle
|
|
116
|
-
index b546c74..aee9a1f 100644
|
|
117
|
-
--- a/build.gradle
|
|
118
|
-
+++ b/build.gradle
|
|
119
|
-
@@ -2,4 +2,7 @@
|
|
120
|
-
plugins {
|
|
121
|
-
alias(libs.plugins.android.application) apply false
|
|
122
|
-
alias(libs.plugins.kotlin.compose) apply false
|
|
123
|
-
+ // >>> TOPSDK PLUGIN AUTO START
|
|
124
|
-
+ id 'com.google.gms.google-services' version '4.4.4' apply false
|
|
125
|
-
+ // >>> TOPSDK PLUGIN AUTO END
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
|
|
129
|
-
index 5927aac..615935a 100644
|
|
130
|
-
--- a/app/src/main/AndroidManifest.xml
|
|
131
|
-
+++ b/app/src/main/AndroidManifest.xml
|
|
132
|
-
@@ -24,4 +24,8 @@
|
|
133
|
-
</activity>
|
|
134
|
-
</application>
|
|
135
|
-
|
|
136
|
-
+
|
|
137
|
-
+<!-- MEET_INTEGRATE PERMISSIONS START -->
|
|
138
|
-
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
139
|
-
+<!-- MEET_INTEGRATE PERMISSIONS END -->
|
|
140
|
-
</manifest>
|
|
141
|
-
|
|
142
|
-
# dry-run — android-integration.fixture.json
|
|
143
|
-
diff --git a/app/build.gradle b/app/build.gradle
|
|
144
|
-
index ba437dd..b97390c 100644
|
|
145
|
-
--- a/app/build.gradle
|
|
146
|
-
+++ b/app/build.gradle
|
|
147
|
-
@@ -1,6 +1,9 @@
|
|
148
|
-
plugins {
|
|
149
|
-
alias(libs.plugins.android.application)
|
|
150
|
-
alias(libs.plugins.kotlin.compose)
|
|
151
|
-
+ // >>> TOPSDK PLUGIN AUTO START
|
|
152
|
-
+ id 'com.google.gms.google-services'
|
|
153
|
-
+ // >>> TOPSDK PLUGIN AUTO END
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
android {
|
|
157
|
-
@@ -10,14 +13,42 @@ android {
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
defaultConfig {
|
|
161
|
-
- applicationId "com.example.myapplication"
|
|
162
|
-
+ applicationId "com.meet.integrate.androidsample"
|
|
163
|
-
minSdk 24
|
|
164
|
-
targetSdk 36
|
|
165
|
-
versionCode 1
|
|
166
|
-
versionName "1.0"
|
|
167
|
-
|
|
168
|
-
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
169
|
-
- }
|
|
170
|
-
+ // >>> TOPSDK AUTO START
|
|
171
|
-
+ resValue('string', 'top_channel_id', 'GOOGLE')
|
|
172
|
-
+ resValue('string', 'top_app_id', 'mock-topsdk-app-id')
|
|
173
|
-
+ resValue('string', 'facebook_app_id', '0000000000000000')
|
|
174
|
-
+ resValue('string', 'fb_login_protocol_scheme', 'fb0000000000000000')
|
|
175
|
-
+ resValue('string', 'facebook_client_token', 'mockfacebookclienttoken00000000')
|
|
176
|
-
+ resValue('string', 'google_client_id', 'mock-client-id.apps.googleusercontent.com')
|
|
177
|
-
+ resValue('string', 'twitter_client_id', 'MOCK_TWITTER_OAUTH2_CLIENT_ID')
|
|
178
|
-
+ resValue('string', 'twitter_client_secret', 'MOCK_TWITTER_OAUTH2_CLIENT_SECRET')
|
|
179
|
-
+ resValue('string', 'twitter_redirect_url', 'com.feishu.topsdk://callback')
|
|
180
|
-
+ resValue('string', 'snapchat_client_id', 'MOCK_SNAPCHAT_CLIENT_ID_UUID')
|
|
181
|
-
+ resValue('string', 'snapchat_redirect_uri', 'https://com.feishu.topsdk/snapchat/callback')
|
|
182
|
-
+ resValue('string', 'tiktok_client_id', 'MOCK_TIKTOK_CLIENT_KEY')
|
|
183
|
-
+ resValue('string', 'tiktok_client_secret', 'MOCK_TIKTOK_CLIENT_SECRET')
|
|
184
|
-
+ resValue('string', 'tiktok_redirect_uri', 'https://example.invalid/tiktok/oauth/callback')
|
|
185
|
-
+ resValue('string', 'line_channel_id', 'MOCK_LINE_CHANNEL_ID')
|
|
186
|
-
+ resValue('string', 'kakao_app_id', 'MOCK_KAKAO_NATIVE_APP_KEY')
|
|
187
|
-
+ resValue('string', 'kakao_scheme', 'kakaoMOCK_KAKAO_NATIVE_APP_KEY')
|
|
188
|
-
+ resValue('string', 'naver_client_id', 'MOCK_NAVER_CLIENT_ID')
|
|
189
|
-
+ resValue('string', 'naver_client_secret', 'MOCK_NAVER_CLIENT_SECRET')
|
|
190
|
-
+ resValue('string', 'naver_client_name', 'Android Sample')
|
|
191
|
-
+ resValue('bool', 'appsflyer_enable_debug_log', "true")
|
|
192
|
-
+ resValue('string', 'af_dev_key', 'MOCK_APPSFLYER_DEV_KEY')
|
|
193
|
-
+ resValue('bool', 'adjust_enable_sandbox', "false")
|
|
194
|
-
+ resValue('string', 'adjust_app_token', 'MOCK_ADJUST_APP_ID')
|
|
195
|
-
+ resValue('string', 'facebook_data_app_id', '0000000000000000')
|
|
196
|
-
+ resValue('string', 'facebook_data_client_token', 'mockfacebookclienttoken00000000')
|
|
197
|
-
+// >>> TOPSDK AUTO END
|
|
198
|
-
+}
|
|
199
|
-
|
|
200
|
-
buildTypes {
|
|
201
|
-
release {
|
|
202
|
-
@@ -50,4 +81,28 @@ dependencies {
|
|
203
|
-
androidTestImplementation libs.androidx.compose.ui.test.junit4
|
|
204
|
-
debugImplementation libs.androidx.compose.ui.tooling
|
|
205
|
-
debugImplementation libs.androidx.compose.ui.test.manifest
|
|
206
|
-
+// >>> TOPSDK AUTO START
|
|
207
|
-
+ def topsdk_version = "1.6.1.3"
|
|
208
|
-
+ def groupId = "com.sino.topsdk"
|
|
209
|
-
+
|
|
210
|
-
+ implementation "$groupId:ui:$topsdk_version"
|
|
211
|
-
+ implementation "$groupId:guest:$topsdk_version"
|
|
212
|
-
+ implementation "$groupId:email:$topsdk_version"
|
|
213
|
-
+ implementation "$groupId:facebook:$topsdk_version"
|
|
214
|
-
+ implementation "$groupId:google:$topsdk_version"
|
|
215
|
-
+ implementation "$groupId:twitter:$topsdk_version"
|
|
216
|
-
+ implementation "$groupId:snapchat:$topsdk_version"
|
|
217
|
-
+ implementation "$groupId:line:$topsdk_version"
|
|
218
|
-
+ implementation "$groupId:naver:$topsdk_version"
|
|
219
|
-
+ implementation "$groupId:kakao:$topsdk_version"
|
|
220
|
-
+ implementation "$groupId:tiktok:$topsdk_version"
|
|
221
|
-
+ implementation "$groupId:appsflyer:$topsdk_version"
|
|
222
|
-
+ implementation "$groupId:firebase:$topsdk_version"
|
|
223
|
-
+ implementation "$groupId:adjust:$topsdk_version"
|
|
224
|
-
+ implementation "$groupId:facebook-data:$topsdk_version"
|
|
225
|
-
+ implementation "$groupId:google-iap:$topsdk_version"
|
|
226
|
-
+ implementation "$groupId:onestore-iap:$topsdk_version"
|
|
227
|
-
+ implementation "$groupId:huawei-iap:$topsdk_version"
|
|
228
|
-
+ implementation "$groupId:xiaomi-iap:$topsdk_version"
|
|
229
|
-
+// >>> TOPSDK AUTO END
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
diff --git a/settings.gradle b/settings.gradle
|
|
233
|
-
index 437187c..a7deb33 100644
|
|
234
|
-
--- a/settings.gradle
|
|
235
|
-
+++ b/settings.gradle
|
|
236
|
-
@@ -14,9 +14,16 @@ pluginManagement {
|
|
237
|
-
dependencyResolutionManagement {
|
|
238
|
-
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
|
239
|
-
repositories {
|
|
240
|
-
- google()
|
|
241
|
-
+ // >>> TOPSDK REPO AUTO START
|
|
242
|
-
+ maven { url 'https://devrepo.kakao.com/nexus/content/groups/public/' }
|
|
243
|
-
+ maven { url 'https://artifact.bytedance.com/repository/AwemeOpenSDK' }
|
|
244
|
-
mavenCentral()
|
|
245
|
-
- }
|
|
246
|
-
+ google()
|
|
247
|
-
+ maven { url 'https://repo.onestore.co.kr/repository/onestore-sdk-public/' }
|
|
248
|
-
+ maven { url 'https://developer.huawei.com/repo/' }
|
|
249
|
-
+ maven { url 'https://storage-sdk-gameplus.meetsocial.com/repository/TopSdk/' }
|
|
250
|
-
+// >>> TOPSDK REPO AUTO END
|
|
251
|
-
+}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
rootProject.name = "My Application"
|
|
255
|
-
|
|
256
|
-
diff --git a/build.gradle b/build.gradle
|
|
257
|
-
index b546c74..aee9a1f 100644
|
|
258
|
-
--- a/build.gradle
|
|
259
|
-
+++ b/build.gradle
|
|
260
|
-
@@ -2,4 +2,7 @@
|
|
261
|
-
plugins {
|
|
262
|
-
alias(libs.plugins.android.application) apply false
|
|
263
|
-
alias(libs.plugins.kotlin.compose) apply false
|
|
264
|
-
+ // >>> TOPSDK PLUGIN AUTO START
|
|
265
|
-
+ id 'com.google.gms.google-services' version '4.4.4' apply false
|
|
266
|
-
+ // >>> TOPSDK PLUGIN AUTO END
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
|
|
270
|
-
index 5927aac..615935a 100644
|
|
271
|
-
--- a/app/src/main/AndroidManifest.xml
|
|
272
|
-
+++ b/app/src/main/AndroidManifest.xml
|
|
273
|
-
@@ -24,4 +24,8 @@
|
|
274
|
-
</activity>
|
|
275
|
-
</application>
|
|
276
|
-
|
|
277
|
-
+
|
|
278
|
-
+<!-- MEET_INTEGRATE PERMISSIONS START -->
|
|
279
|
-
+ <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
|
280
|
-
+<!-- MEET_INTEGRATE PERMISSIONS END -->
|
|
281
|
-
</manifest>
|
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import zlib from "node:zlib";
|
|
5
|
-
import { afterEach, describe, expect, it } from "vitest";
|
|
6
|
-
import { extractUniversalApk } from "../src/aab-converter/apksExtractor.js";
|
|
7
|
-
import { buildBundletoolArgs, redactedBundletoolCommand } from "../src/aab-converter/bundletoolRunner.js";
|
|
8
|
-
import { parseAabCliArgv, validateConvertArgs } from "../src/aab-converter/cliArgs.js";
|
|
9
|
-
import { resolveOutputPaths } from "../src/aab-converter/convertAabToApk.js";
|
|
10
|
-
|
|
11
|
-
const tempDirs: string[] = [];
|
|
12
|
-
|
|
13
|
-
afterEach(() => {
|
|
14
|
-
for (const dir of tempDirs.splice(0)) {
|
|
15
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
|
16
|
-
}
|
|
17
|
-
delete process.env.TEST_KS_PASS;
|
|
18
|
-
delete process.env.TEST_KEY_PASS;
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
function tempDir(): string {
|
|
22
|
-
const dir = fs.mkdtempSync(path.join(os.tmpdir(), "aab-converter-test-"));
|
|
23
|
-
tempDirs.push(dir);
|
|
24
|
-
return dir;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function crc32(buf: Buffer): number {
|
|
28
|
-
let crc = 0xffffffff;
|
|
29
|
-
for (const b of buf) {
|
|
30
|
-
crc ^= b;
|
|
31
|
-
for (let i = 0; i < 8; i += 1) {
|
|
32
|
-
crc = (crc >>> 1) ^ (0xedb88320 & -(crc & 1));
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return (crc ^ 0xffffffff) >>> 0;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function u16(value: number): Buffer {
|
|
39
|
-
const buf = Buffer.alloc(2);
|
|
40
|
-
buf.writeUInt16LE(value);
|
|
41
|
-
return buf;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function u32(value: number): Buffer {
|
|
45
|
-
const buf = Buffer.alloc(4);
|
|
46
|
-
buf.writeUInt32LE(value);
|
|
47
|
-
return buf;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function createZip(entries: Array<{ name: string; content: Buffer }>): Buffer {
|
|
51
|
-
const localParts: Buffer[] = [];
|
|
52
|
-
const centralParts: Buffer[] = [];
|
|
53
|
-
let offset = 0;
|
|
54
|
-
for (const entry of entries) {
|
|
55
|
-
const name = Buffer.from(entry.name, "utf8");
|
|
56
|
-
const compressed = zlib.deflateRawSync(entry.content);
|
|
57
|
-
const crc = crc32(entry.content);
|
|
58
|
-
const local = Buffer.concat([
|
|
59
|
-
u32(0x04034b50),
|
|
60
|
-
u16(20),
|
|
61
|
-
u16(0),
|
|
62
|
-
u16(8),
|
|
63
|
-
u16(0),
|
|
64
|
-
u16(0),
|
|
65
|
-
u32(crc),
|
|
66
|
-
u32(compressed.length),
|
|
67
|
-
u32(entry.content.length),
|
|
68
|
-
u16(name.length),
|
|
69
|
-
u16(0),
|
|
70
|
-
name,
|
|
71
|
-
compressed,
|
|
72
|
-
]);
|
|
73
|
-
localParts.push(local);
|
|
74
|
-
centralParts.push(
|
|
75
|
-
Buffer.concat([
|
|
76
|
-
u32(0x02014b50),
|
|
77
|
-
u16(20),
|
|
78
|
-
u16(20),
|
|
79
|
-
u16(0),
|
|
80
|
-
u16(8),
|
|
81
|
-
u16(0),
|
|
82
|
-
u16(0),
|
|
83
|
-
u32(crc),
|
|
84
|
-
u32(compressed.length),
|
|
85
|
-
u32(entry.content.length),
|
|
86
|
-
u16(name.length),
|
|
87
|
-
u16(0),
|
|
88
|
-
u16(0),
|
|
89
|
-
u16(0),
|
|
90
|
-
u16(0),
|
|
91
|
-
u32(0),
|
|
92
|
-
u32(offset),
|
|
93
|
-
name,
|
|
94
|
-
])
|
|
95
|
-
);
|
|
96
|
-
offset += local.length;
|
|
97
|
-
}
|
|
98
|
-
const centralDir = Buffer.concat(centralParts);
|
|
99
|
-
const eocd = Buffer.concat([
|
|
100
|
-
u32(0x06054b50),
|
|
101
|
-
u16(0),
|
|
102
|
-
u16(0),
|
|
103
|
-
u16(entries.length),
|
|
104
|
-
u16(entries.length),
|
|
105
|
-
u32(centralDir.length),
|
|
106
|
-
u32(offset),
|
|
107
|
-
u16(0),
|
|
108
|
-
]);
|
|
109
|
-
return Buffer.concat([...localParts, centralDir, eocd]);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
describe("AAB converter CLI args", () => {
|
|
113
|
-
it("parses env passwords and defaults to overwrite", () => {
|
|
114
|
-
const dir = tempDir();
|
|
115
|
-
const aab = path.join(dir, "sample.aab");
|
|
116
|
-
const jks = path.join(dir, "sample.jks");
|
|
117
|
-
fs.writeFileSync(aab, "aab");
|
|
118
|
-
fs.writeFileSync(jks, "jks");
|
|
119
|
-
process.env.TEST_KS_PASS = "store-pass";
|
|
120
|
-
process.env.TEST_KEY_PASS = "key-pass";
|
|
121
|
-
|
|
122
|
-
const parsed = parseAabCliArgv([
|
|
123
|
-
"node",
|
|
124
|
-
"aab-entry.js",
|
|
125
|
-
"convert",
|
|
126
|
-
"--aab",
|
|
127
|
-
aab,
|
|
128
|
-
"--out-dir",
|
|
129
|
-
path.join(dir, "out"),
|
|
130
|
-
"--ks",
|
|
131
|
-
jks,
|
|
132
|
-
"--ks-key-alias",
|
|
133
|
-
"release",
|
|
134
|
-
"--ks-pass-env",
|
|
135
|
-
"TEST_KS_PASS",
|
|
136
|
-
"--key-pass-env",
|
|
137
|
-
"TEST_KEY_PASS",
|
|
138
|
-
]);
|
|
139
|
-
const validated = validateConvertArgs(parsed);
|
|
140
|
-
expect(validated.overwrite).toBe(true);
|
|
141
|
-
expect(validated.signing.keyStorePassword).toBe("store-pass");
|
|
142
|
-
expect(validated.signing.keyPassword).toBe("key-pass");
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
it("supports --no-overwrite", () => {
|
|
146
|
-
const parsed = parseAabCliArgv(["node", "aab-entry.js", "convert", "--no-overwrite"]);
|
|
147
|
-
expect(parsed.overwrite).toBe(false);
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
|
|
151
|
-
describe("bundletool command", () => {
|
|
152
|
-
it("builds signed universal APK set args and redacts passwords", () => {
|
|
153
|
-
const args = buildBundletoolArgs({
|
|
154
|
-
bundletoolPath: "tools/bundletool.jar",
|
|
155
|
-
aabPath: "game.aab",
|
|
156
|
-
apksPath: "game.apks",
|
|
157
|
-
overwrite: true,
|
|
158
|
-
signing: {
|
|
159
|
-
keyStorePath: "release.jks",
|
|
160
|
-
keyAlias: "release",
|
|
161
|
-
keyStorePassword: "store-secret-value",
|
|
162
|
-
keyPassword: "key-secret-value",
|
|
163
|
-
},
|
|
164
|
-
});
|
|
165
|
-
expect(args).toContain("build-apks");
|
|
166
|
-
expect(args).toContain("--mode=universal");
|
|
167
|
-
expect(args).toContain("--overwrite");
|
|
168
|
-
expect(args).toContain("--ks-pass=pass:store-secret-value");
|
|
169
|
-
expect(args).toContain("--key-pass=pass:key-secret-value");
|
|
170
|
-
const redacted = redactedBundletoolCommand("java", args);
|
|
171
|
-
expect(redacted).toContain("--ks-pass=pass:******");
|
|
172
|
-
expect(redacted).toContain("--key-pass=pass:******");
|
|
173
|
-
expect(redacted).not.toContain("store-secret-value");
|
|
174
|
-
expect(redacted).not.toContain("key-secret-value");
|
|
175
|
-
});
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
describe("APKS extraction", () => {
|
|
179
|
-
it("extracts universal.apk from a zip based .apks file", async () => {
|
|
180
|
-
const dir = tempDir();
|
|
181
|
-
const apks = path.join(dir, "sample.apks");
|
|
182
|
-
const apk = path.join(dir, "sample.apk");
|
|
183
|
-
fs.writeFileSync(
|
|
184
|
-
apks,
|
|
185
|
-
createZip([
|
|
186
|
-
{ name: "toc.pb", content: Buffer.from("toc") },
|
|
187
|
-
{ name: "universal.apk", content: Buffer.from("apk-binary") },
|
|
188
|
-
])
|
|
189
|
-
);
|
|
190
|
-
await extractUniversalApk(apks, apk, true);
|
|
191
|
-
expect(fs.readFileSync(apk, "utf8")).toBe("apk-binary");
|
|
192
|
-
});
|
|
193
|
-
|
|
194
|
-
it("fails when output exists and overwrite is disabled", async () => {
|
|
195
|
-
const dir = tempDir();
|
|
196
|
-
const apks = path.join(dir, "sample.apks");
|
|
197
|
-
const apk = path.join(dir, "sample.apk");
|
|
198
|
-
fs.writeFileSync(apks, createZip([{ name: "universal.apk", content: Buffer.from("new") }]));
|
|
199
|
-
fs.writeFileSync(apk, "old");
|
|
200
|
-
await expect(extractUniversalApk(apks, apk, false)).rejects.toThrow(/already exists/);
|
|
201
|
-
});
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
describe("output paths", () => {
|
|
205
|
-
it("uses the AAB base name for default APK and APKS outputs", () => {
|
|
206
|
-
const paths = resolveOutputPaths({
|
|
207
|
-
aabPath: path.join("D:", "pkg", "game.aab"),
|
|
208
|
-
outDir: path.join("D:", "out"),
|
|
209
|
-
});
|
|
210
|
-
expect(paths.apksPath.endsWith(`${path.sep}game.apks`)).toBe(true);
|
|
211
|
-
expect(paths.apkPath.endsWith(`${path.sep}game_universal.apk`)).toBe(true);
|
|
212
|
-
});
|
|
213
|
-
});
|
|
File without changes
|
|
File without changes
|