-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (69 loc) · 2.03 KB
/
Makefile
File metadata and controls
89 lines (69 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Makefile for building and running Rooster on connected devices
APP_ID := com.rooster.rooster/.MainActivity
# Device IDs
SAMSUNG_ID := 616ecbcf
PIXEL4A_ID := 0B201JECB13875
PIXEL9A_ID := 59101JEBF02652
# Default target
.PHONY: all
all: help
# === Android build & run ===
.PHONY: install
install:
./gradlew installDebug
.PHONY: run-pixel4a
run-pixel4a: install
adb -s $(PIXEL4A_ID) shell am start -n $(APP_ID)
.PHONY: run-pixel9a
run-pixel9a: install
adb -s $(PIXEL9A_ID) shell am start -n $(APP_ID)
.PHONY: run-samsung
run-samsung: install
adb -s $(SAMSUNG_ID) shell am start -n $(APP_ID)
.PHONY: devices
devices:
adb devices
.PHONY: logs
logs:
adb logcat --pid=$$(adb shell pidof com.rooster.rooster)
.PHONY: clean
clean:
./gradlew clean
.PHONY: build
build:
./gradlew build
.PHONY: test
test:
./gradlew test
.PHONY: lint
lint:
./gradlew lint
.PHONY: uninstall
uninstall:
adb uninstall com.rooster.rooster
clear-data:
adb shell pm clear com.rooster.rooster
reinstall: uninstall install
# === Help ===
.PHONY: help
help:
@echo "Available commands:"
@echo ""
@echo "Build & Run:"
@echo " make install - Build and install the debug APK"
@echo " make run-pixel4a - Install and run on Pixel 4a (ID: $(PIXEL4A_ID))"
@echo " make run-pixel9a - Install and run on Pixel 9a (ID: $(PIXEL9A_ID))"
@echo " make run-samsung - Install and run on Samsung (ID: $(SAMSUNG_ID))"
@echo ""
@echo "Development:"
@echo " make build - Build the project"
@echo " make clean - Clean build artifacts"
@echo " make test - Run unit tests"
@echo " make lint - Run lint checks"
@echo ""
@echo "Device Management:"
@echo " make devices - List connected ADB devices"
@echo " make logs - Show logs for the running app"
@echo " make uninstall - Uninstall the app from device"
@echo " make clear-data - Clear app data without uninstalling"
@echo " make reinstall - Uninstall and reinstall the app"