From a8b070d21ced58bbaef2ec5ec4f54a0358813c66 Mon Sep 17 00:00:00 2001 From: Davide Ferrari Date: Tue, 6 Jan 2026 21:30:55 +0100 Subject: [PATCH] chore: add Makefile for easier debug builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add Makefile with targets for building, installing, and running debug builds on connected devices. Update DEVELOPMENT.md to document the available make targets. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Makefile | 30 ++++++++++++++++++++++++++++++ docs/DEVELOPMENT.md | 12 +++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..4a8c1cf --- /dev/null +++ b/Makefile @@ -0,0 +1,30 @@ +.PHONY: build install run 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" + +# Build debug APK +build: + ./gradlew assembleDebug + +# Build and install debug APK on connected device +install: build + adb install -r app/build/outputs/apk/debug/app-debug.apk + +# Build, install, and launch the app +run: install + adb shell am start -n com.matedroid/.MainActivity + +# Clean build artifacts +clean: + ./gradlew clean + +# Run unit tests +test: + ./gradlew testDebugUnitTest diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index f299758..abe1388 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -95,9 +95,19 @@ Without secrets, the APK is signed with a debug keystore (fine for sideloading, ### Development Workflow 1. Start your Android emulator or connect a device -2. Build and install: `./gradlew installDebug` +2. Build and install: `make install` 3. View logs: `adb logcat | grep -i matedroid` +#### Makefile Targets + +| Target | Description | +|--------|-------------| +| `make build` | Build debug APK | +| `make install` | Build and install debug APK on connected device | +| `make run` | Build, install, and launch the app | +| `make clean` | Clean build artifacts | +| `make test` | Run unit tests | + Or use Android Studio: 1. Open the project folder 2. Wait for Gradle sync