diff --git a/Makefile b/Makefile index 4a8c1cf..60ec867 100644 --- a/Makefile +++ b/Makefile @@ -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