From 0c2e6fe97feb0e0b56621cf06652d65c65402d44 Mon Sep 17 00:00:00 2001 From: Ayaan Zaidi Date: Fri, 20 Mar 2026 12:55:52 +0530 Subject: [PATCH] ci(android): use explicit flavor debug tasks --- .github/workflows/ci.yml | 12 ++++++++---- .github/workflows/codeql.yml | 2 +- apps/android/README.md | 15 ++++++++++++--- docs/platforms/android.md | 2 +- package.json | 12 ++++++++---- 5 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f87c816488..5fd76c2f9f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -972,10 +972,14 @@ jobs: fail-fast: false matrix: include: - - task: test - command: ./gradlew --no-daemon :app:testDebugUnitTest - - task: build - command: ./gradlew --no-daemon :app:assembleDebug + - task: test-play + command: ./gradlew --no-daemon :app:testPlayDebugUnitTest + - task: test-third-party + command: ./gradlew --no-daemon :app:testThirdPartyDebugUnitTest + - task: build-play + command: ./gradlew --no-daemon :app:assemblePlayDebug + - task: build-third-party + command: ./gradlew --no-daemon :app:assembleThirdPartyDebug steps: - name: Checkout uses: actions/checkout@v6 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 79c041ef727..e3f9db202b7 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -116,7 +116,7 @@ jobs: - name: Build Android for CodeQL if: matrix.language == 'java-kotlin' working-directory: apps/android - run: ./gradlew --no-daemon :app:assembleDebug + run: ./gradlew --no-daemon :app:assemblePlayDebug - name: Build Swift for CodeQL if: matrix.language == 'swift' diff --git a/apps/android/README.md b/apps/android/README.md index 8ab8543acf4..e8694dbbdb8 100644 --- a/apps/android/README.md +++ b/apps/android/README.md @@ -27,13 +27,22 @@ Status: **extremely alpha**. The app is actively being rebuilt from the ground u ```bash cd apps/android -./gradlew :app:assembleDebug -./gradlew :app:installDebug -./gradlew :app:testDebugUnitTest +./gradlew :app:assemblePlayDebug +./gradlew :app:installPlayDebug +./gradlew :app:testPlayDebugUnitTest cd ../.. bun run android:bundle:release ``` +Third-party debug flavor: + +```bash +cd apps/android +./gradlew :app:assembleThirdPartyDebug +./gradlew :app:installThirdPartyDebug +./gradlew :app:testThirdPartyDebugUnitTest +``` + `bun run android:bundle:release` auto-bumps Android `versionName`/`versionCode` in `apps/android/app/build.gradle.kts`, then builds two signed release bundles: - Play build: `apps/android/build/release-bundles/openclaw--play-release.aab` diff --git a/docs/platforms/android.md b/docs/platforms/android.md index 384b5311c33..e52f388b1ac 100644 --- a/docs/platforms/android.md +++ b/docs/platforms/android.md @@ -9,7 +9,7 @@ title: "Android App" # Android App (Node) -> **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. +> **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. ## Support snapshot diff --git a/package.json b/package.json index f0fe9ff88fa..ed8cc402625 100644 --- a/package.json +++ b/package.json @@ -528,15 +528,19 @@ "./cli-entry": "./openclaw.mjs" }, "scripts": { - "android:assemble": "cd apps/android && ./gradlew :app:assembleDebug", + "android:assemble": "cd apps/android && ./gradlew :app:assemblePlayDebug", + "android:assemble:third-party": "cd apps/android && ./gradlew :app:assembleThirdPartyDebug", "android:bundle:release": "bun apps/android/scripts/build-release-aab.ts", "android:format": "cd apps/android && ./gradlew :app:ktlintFormat :benchmark:ktlintFormat", - "android:install": "cd apps/android && ./gradlew :app:installDebug", + "android:install": "cd apps/android && ./gradlew :app:installPlayDebug", + "android:install:third-party": "cd apps/android && ./gradlew :app:installThirdPartyDebug", "android:lint": "cd apps/android && ./gradlew :app:ktlintCheck :benchmark:ktlintCheck", "android:lint:android": "cd apps/android && ./gradlew :app:lintDebug", - "android:run": "cd apps/android && ./gradlew :app:installDebug && adb shell am start -n ai.openclaw.app/.MainActivity", - "android:test": "cd apps/android && ./gradlew :app:testDebugUnitTest", + "android:run": "cd apps/android && ./gradlew :app:installPlayDebug && adb shell am start -n ai.openclaw.app/.MainActivity", + "android:run:third-party": "cd apps/android && ./gradlew :app:installThirdPartyDebug && adb shell am start -n ai.openclaw.app/.MainActivity", + "android:test": "cd apps/android && ./gradlew :app:testPlayDebugUnitTest", "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", + "android:test:third-party": "cd apps/android && ./gradlew :app:testThirdPartyDebugUnitTest", "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", "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", "build:plugin-sdk:dts": "tsc -p tsconfig.plugin-sdk.dts.json",