Skip to content

Commit 0c2e6fe

Browse files
committed
ci(android): use explicit flavor debug tasks
1 parent f09f985 commit 0c2e6fe

File tree

5 files changed

+30
-13
lines changed

5 files changed

+30
-13
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -972,10 +972,14 @@ jobs:
972972
fail-fast: false
973973
matrix:
974974
include:
975-
- task: test
976-
command: ./gradlew --no-daemon :app:testDebugUnitTest
977-
- task: build
978-
command: ./gradlew --no-daemon :app:assembleDebug
975+
- task: test-play
976+
command: ./gradlew --no-daemon :app:testPlayDebugUnitTest
977+
- task: test-third-party
978+
command: ./gradlew --no-daemon :app:testThirdPartyDebugUnitTest
979+
- task: build-play
980+
command: ./gradlew --no-daemon :app:assemblePlayDebug
981+
- task: build-third-party
982+
command: ./gradlew --no-daemon :app:assembleThirdPartyDebug
979983
steps:
980984
- name: Checkout
981985
uses: actions/checkout@v6

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ jobs:
116116
- name: Build Android for CodeQL
117117
if: matrix.language == 'java-kotlin'
118118
working-directory: apps/android
119-
run: ./gradlew --no-daemon :app:assembleDebug
119+
run: ./gradlew --no-daemon :app:assemblePlayDebug
120120

121121
- name: Build Swift for CodeQL
122122
if: matrix.language == 'swift'

apps/android/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,22 @@ Status: **extremely alpha**. The app is actively being rebuilt from the ground u
2727

2828
```bash
2929
cd apps/android
30-
./gradlew :app:assembleDebug
31-
./gradlew :app:installDebug
32-
./gradlew :app:testDebugUnitTest
30+
./gradlew :app:assemblePlayDebug
31+
./gradlew :app:installPlayDebug
32+
./gradlew :app:testPlayDebugUnitTest
3333
cd ../..
3434
bun run android:bundle:release
3535
```
3636

37+
Third-party debug flavor:
38+
39+
```bash
40+
cd apps/android
41+
./gradlew :app:assembleThirdPartyDebug
42+
./gradlew :app:installThirdPartyDebug
43+
./gradlew :app:testThirdPartyDebugUnitTest
44+
```
45+
3746
`bun run android:bundle:release` auto-bumps Android `versionName`/`versionCode` in `apps/android/app/build.gradle.kts`, then builds two signed release bundles:
3847

3948
- Play build: `apps/android/build/release-bundles/openclaw-<version>-play-release.aab`

docs/platforms/android.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: "Android App"
99

1010
# Android App (Node)
1111

12-
> **Note:** The Android app has not been publicly released yet. The source code is available in the [OpenClaw repository](https://github.com/openclaw/openclaw) under `apps/android`. You can build it yourself using Java 17 and the Android SDK (`./gradlew :app:assembleDebug`). See [apps/android/README.md](https://github.com/openclaw/openclaw/blob/main/apps/android/README.md) for build instructions.
12+
> **Note:** The Android app has not been publicly released yet. The source code is available in the [OpenClaw repository](https://github.com/openclaw/openclaw) under `apps/android`. You can build it yourself using Java 17 and the Android SDK (`./gradlew :app:assemblePlayDebug`). See [apps/android/README.md](https://github.com/openclaw/openclaw/blob/main/apps/android/README.md) for build instructions.
1313
1414
## Support snapshot
1515

package.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -528,15 +528,19 @@
528528
"./cli-entry": "./openclaw.mjs"
529529
},
530530
"scripts": {
531-
"android:assemble": "cd apps/android && ./gradlew :app:assembleDebug",
531+
"android:assemble": "cd apps/android && ./gradlew :app:assemblePlayDebug",
532+
"android:assemble:third-party": "cd apps/android && ./gradlew :app:assembleThirdPartyDebug",
532533
"android:bundle:release": "bun apps/android/scripts/build-release-aab.ts",
533534
"android:format": "cd apps/android && ./gradlew :app:ktlintFormat :benchmark:ktlintFormat",
534-
"android:install": "cd apps/android && ./gradlew :app:installDebug",
535+
"android:install": "cd apps/android && ./gradlew :app:installPlayDebug",
536+
"android:install:third-party": "cd apps/android && ./gradlew :app:installThirdPartyDebug",
535537
"android:lint": "cd apps/android && ./gradlew :app:ktlintCheck :benchmark:ktlintCheck",
536538
"android:lint:android": "cd apps/android && ./gradlew :app:lintDebug",
537-
"android:run": "cd apps/android && ./gradlew :app:installDebug && adb shell am start -n ai.openclaw.app/.MainActivity",
538-
"android:test": "cd apps/android && ./gradlew :app:testDebugUnitTest",
539+
"android:run": "cd apps/android && ./gradlew :app:installPlayDebug && adb shell am start -n ai.openclaw.app/.MainActivity",
540+
"android:run:third-party": "cd apps/android && ./gradlew :app:installThirdPartyDebug && adb shell am start -n ai.openclaw.app/.MainActivity",
541+
"android:test": "cd apps/android && ./gradlew :app:testPlayDebugUnitTest",
539542
"android:test:integration": "OPENCLAW_LIVE_TEST=1 OPENCLAW_LIVE_ANDROID_NODE=1 vitest run --config vitest.live.config.ts src/gateway/android-node.capabilities.live.test.ts",
543+
"android:test:third-party": "cd apps/android && ./gradlew :app:testThirdPartyDebugUnitTest",
540544
"build": "pnpm canvas:a2ui:bundle && node scripts/tsdown-build.mjs && node scripts/runtime-postbuild.mjs && pnpm build:plugin-sdk:dts && node --import tsx scripts/write-plugin-sdk-entry-dts.ts && node --import tsx scripts/canvas-a2ui-copy.ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/copy-export-html-templates.ts && node --import tsx scripts/write-build-info.ts && node --import tsx scripts/write-cli-startup-metadata.ts && node --import tsx scripts/write-cli-compat.ts",
541545
"build:docker": "node scripts/tsdown-build.mjs && node scripts/runtime-postbuild.mjs && node --import tsx scripts/canvas-a2ui-copy.ts && node --import tsx scripts/copy-hook-metadata.ts && node --import tsx scripts/copy-export-html-templates.ts && node --import tsx scripts/write-build-info.ts && node --import tsx scripts/write-cli-startup-metadata.ts && node --import tsx scripts/write-cli-compat.ts",
542546
"build:plugin-sdk:dts": "tsc -p tsconfig.plugin-sdk.dts.json",

0 commit comments

Comments
 (0)