feat: add distribution flavor dimension (direct/googleplay)#62
feat: add distribution flavor dimension (direct/googleplay)#62KoheiYamashita wants to merge 2 commits into
Conversation
…id builds Add a second flavor dimension `distribution` (direct/googleplay) alongside existing `variant` (embedded/termux) to support Google Play distribution. Exclude `termuxGoogleplay` combination. Update all CI workflows, docs, and DI modules accordingly. Closes #53 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! このプルリクエストは、AndroidアプリケーションのGoogle Play配布をサポートするための基盤を構築します。既存のビルドフレーバーに加えて、 Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
このプルリクエストは、Androidビルドに distribution フレーバー次元(direct / googleplay)を追加し、Google Playストアへの配布に向けた基盤を整備するものです。主な変更点として、build.gradle.ktsでのフレーバー設定、フレーバーごとのソースセットとDIモジュールの追加、CIワークフローとドキュメントの更新が含まれています。全体的に変更は適切で、将来の拡張性も考慮されています。1点、DistributionModule.kt が direct と googleplay の両フレーバーで重複しているため、これを共通化することでメンテナンス性を向上させる提案をしました。
| package io.clawdroid.di | ||
|
|
||
| import org.koin.core.qualifier.named | ||
| import org.koin.dsl.module | ||
|
|
||
| val distributionModule = module { | ||
| single<Map<String, String>>(named("distributionEnv")) { emptyMap() } | ||
| } |
There was a problem hiding this comment.
Pull request overview
Adds a new Android flavor dimension for distribution targets (direct vs googleplay) to support Google Play builds, wiring the new dimension through DI and CI workflows while documenting the new build matrix.
Changes:
- Introduces
distributionflavor dimension (direct/googleplay) alongside existingvariantflavors and excludestermuxGoogleplay. - Adds a new
DistributionModuleand passes distribution-specific env vars intoGatewayProcessManager. - Updates GitHub Actions workflows and docs to use the new variant task/output names.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| android/backend/loader/src/main/java/io/clawdroid/backend/loader/GatewayProcessManager.kt | Adds extraEnv support and merges it into the process environment when starting the gateway. |
| android/app/src/main/java/io/clawdroid/ClawDroidApp.kt | Registers distributionModule in Koin module list. |
| android/app/src/googleplay/java/io/clawdroid/di/DistributionModule.kt | Adds distribution-scoped Koin module (currently provides empty env map). |
| android/app/src/direct/java/io/clawdroid/di/DistributionModule.kt | Adds distribution-scoped Koin module (currently provides empty env map). |
| android/app/src/embedded/java/io/clawdroid/di/FlavorModule.kt | Injects distributionEnv into GatewayProcessManager for embedded builds. |
| android/app/build.gradle.kts | Defines the 2D flavor matrix, adds source sets for distribution flavors, and disables termuxGoogleplay. |
| README.md | Updates installation/build instructions for the new flavor/task names. |
| README.ja.md | Updates installation/build instructions for the new flavor/task names (Japanese). |
| CLAUDE.md | Updates documented Gradle commands for new flavor matrix tasks. |
| .github/workflows/release.yml | Updates release workflow to build/upload artifacts for new flavor combinations, including Google Play AAB. |
| .github/workflows/android-pr.yml | Updates PR CI to lint/test the new flavor combinations. |
| .github/workflows/android-build.yml | Updates build CI matrix and artifact paths for new flavor combinations. |
| .github/workflows/android-aab.yml | Updates AAB workflow to build the embedded Google Play AAB variant. |
| .claude/rules/android.md | Updates internal Android build notes to reflect the new flavor matrix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Embedded Google Play | ||
| ./gradlew assembleEmbeddedGoogleplayDebug | ||
|
|
|
|
||
| # Termux 版(バックエンドなし) | ||
| ./gradlew assembleTermuxDebug | ||
| # 組み込み版 Google Play |
| 1. `cd android && ./gradlew lint` — Lint チェック | ||
| 2. `cd android && ./gradlew test` — ユニットテスト実行 | ||
| 3. `cd android && ./gradlew assembleEmbeddedDebug` — ビルド確認 | ||
| 3. `cd android && ./gradlew assembleEmbeddedGoogleplayDebug` — Google Play 向け Embedded ビルド確認 |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
📝 Description
Issue #53 Phase 1 — Android ビルドフレーバーに
distribution次元(direct/googleplay)を追加し、Google Play 配布をサポートする基盤を構築。variant×distributionの 2 軸フレーバーマトリクス導入(termuxGoogleplayは除外)DistributionModule(direct / googleplay)を新規追加し、DI に統合GatewayProcessManagerにextraEnvパラメータを追加🗣️ Type of Change
🔗 Linked Issue
Closes #53
📚 Technical Context (Skip for Docs)
direct(APK 直接配布)とgoogleplay(Play Store 配布)を分離するための基盤。termuxGoogleplayは意味がないためbeforeVariantsで除外。🧪 Test Environment & Hardware
☑️ Checklist
🤖 Generated with Claude Code