Android: Deploy
Android deployment means building the release APK you distribute or upload to a store track.
Step 1 — Build a release APK through the CLI
mars build --platform android runs the release task for you:
mars build --platform android
Step 2 — Invoke Gradle yourself
- macOS / Linux
- Windows (PowerShell)
cd apps/android
./gradlew assembleRelease # release APK into app/build/outputs/apk/
./gradlew test # JVM unit tests
./gradlew connectedAndroidTest # instrumented tests on a device/emulator
./gradlew clean # remove build artifacts
cd apps/android
.\gradlew.bat assembleRelease # release APK into app/build/outputs/apk/
.\gradlew.bat test # JVM unit tests
.\gradlew.bat connectedAndroidTest # instrumented tests on a device/emulator
.\gradlew.bat clean # remove build artifacts
connectedAndroidTest requires the same device or emulator as installDebug
(see Develop).
Next
For workspace-wide mars dev, mars build and mars clean, see
Start a Project, or
Platforms for the maturity of the other
mobile targets.