-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (26 loc) · 1.54 KB
/
Makefile
File metadata and controls
38 lines (26 loc) · 1.54 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
.DEFAULT_GOAL := help
KTLINT_VERSION := 1.5.0
KTLINT := .ktlint/ktlint
.PHONY: help build run run_release uninstall test format deploy-metadata
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
build: ## Build release APK
./gradlew assembleRelease
run: ## Uninstall, install and run on connected device (use DEVICE=<serial> for multiple devices)
adb $(if $(DEVICE),-s $(DEVICE)) uninstall com.makingiants.android.banjotuner || true
$(if $(DEVICE),ANDROID_SERIAL=$(DEVICE) )./gradlew installDebug
adb $(if $(DEVICE),-s $(DEVICE)) shell am start -n com.makingiants.android.banjotuner/.EarActivity
run_release: ## Uninstall, install and run on connected device on release (use DEVICE=<serial> for multiple devices)
adb $(if $(DEVICE),-s $(DEVICE)) uninstall com.makingiants.android.banjotuner || true
$(if $(DEVICE),ANDROID_SERIAL=$(DEVICE) )./gradlew installRelease
uninstall: ## Uninstall app from connected device (use DEVICE=<serial> for multiple devices)
adb $(if $(DEVICE),-s $(DEVICE)) uninstall com.makingiants.android.banjotuner
test: ## Run unit tests
./gradlew test
$(KTLINT):
@mkdir -p .ktlint
@curl -sSLO "https://github.com/pinterest/ktlint/releases/download/$(KTLINT_VERSION)/ktlint" && chmod +x ktlint && mv ktlint $(KTLINT)
format: $(KTLINT) ## Format all Kotlin code with ktlint
$(KTLINT) --format "app/src/**/*.kt"
deploy-metadata: ## Upload metadata to Play Store via fastlane (no build)
bundle exec fastlane upload_metadata