build: add make targets for release APK build and install

This commit is contained in:
Davide Ferrari
2026-01-13 13:59:18 +01:00
parent d748c50f12
commit 79958eec8c
+21 -6
View File
@@ -1,13 +1,16 @@
.PHONY: build install run clean test help
.PHONY: build install run build-release install-release run-release clean test help
# Default target
help:
@echo "Available targets:"
@echo " build - Build debug APK"
@echo " install - Build and install debug APK on connected device"
@echo " run - Build, install, and launch the app"
@echo " clean - Clean build artifacts"
@echo " test - Run unit tests"
@echo " build - Build debug APK"
@echo " install - Build and install debug APK on connected device"
@echo " run - Build, install, and launch the app (debug)"
@echo " build-release - Build release APK"
@echo " install-release - Build and install release APK on connected device"
@echo " run-release - Build, install, and launch the app (release)"
@echo " clean - Clean build artifacts"
@echo " test - Run unit tests"
# Build debug APK
build:
@@ -21,6 +24,18 @@ install: build
run: install
adb shell am start -n com.matedroid/.MainActivity
# Build release APK
build-release:
./gradlew assembleRelease
# Build and install release APK on connected device
install-release: build-release
adb install -r app/build/outputs/apk/release/app-release.apk
# Build, install, and launch the app (release)
run-release: install-release
adb shell am start -n com.matedroid/.MainActivity
# Clean build artifacts
clean:
./gradlew clean