Build and Release
This page centralizes the main commands, flavor differences, and release notes.
Android / Gradle
Common commands
bash
./gradlew build
./gradlew assembleDevelopDebug
./gradlew assembleProductionRelease
./gradlew installDevelopDebug
./gradlew test
./gradlew connectedAndroidTest
./gradlew lintFlutter
bash
cd ui
flutter pub get
flutter test
flutter analyze
flutter build aarIf you only need to verify the WebChat-related resources, pay attention to the Flutter Web build tasks defined in app/build.gradle.kts.
Docs site
bash
npm install
npm run docs:dev
npm run docs:build
npm run docs:previewThe static output directory is:
text
docs/.vitepress/distFlavor differences
The app module currently defines two flavors:
developproduction
Both inject:
kotlin
buildConfigField("String", "BASE_URL", "\"${prop("OMNIBOT_BASE_URL")}\"")Debug
applicationIdSuffix = ".debug"- no shrinking
- debug signing
Release
- resource shrinking and code shrinking enabled
- release keystore required
- V2 / V3 signatures enabled
Required checks before building
third_party/omniinfersubmodules are initialized.uihas completedflutter pub get.- Release signing properties are present for production builds.
- If local models or QNN are involved, make sure the target device and dependencies are compatible.
An easy-to-miss build behavior
The preBuild step in the app module depends on:
buildFlutterWebBundlesyncFlutterWebBundle
That means Android builds automatically:
- run
flutter build webinsideui/ - use
lib/web_main.dartas the entry point - copy the generated bundle into APK assets
When this chain fails, it is easy to misread the problem as a pure Android build issue while the root cause is actually on the Flutter Web side.
Release checklist
./gradlew test./gradlew lintcd ui && flutter test./gradlew assembleProductionRelease- validate permissions, MCP, workspace, and the main execution path on a real device
