-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
58 lines (44 loc) · 1.58 KB
/
Makefile
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
# Copyright 2024, Addhen Ltd and the kanalytics project contributors
# SPDX-License-Identifier: Apache-2.0
# Makefile to contain all the most frequently used commands. For more tasks use the
# `./gradlew` command directly.
# Note: Makefiles must be indented using TABs and not spaces or make will fail.
.PHONY: buildDebug
buildDebug: # Assemble the debug app (without linting)
@./gradlew assembleDebug -x lint
.PHONY: spotlessCheck
spotlessCheck: # Run spotless checks
@./gradlew spotlessCheck --stacktrace
.PHONY: spotlessApply
spotlessApply: # Run spotless apply to fix code style
@./gradlew spotlessApply --stacktrace
.PHONY: clean
clean: # Do a clean build
@./gradlew clean
.PHONY: build
build: # Assemble the project (without linting)
@./gradlew assemble bundle -x lint
.PHONY: lint
lint: # Run lint checks
@./gradlew lint
.PHONY: test
tests: # Run all unit tests without linting
@./gradlew test -x lint
.PHONY: help
help: # Display this help
@grep -Eh "^[a-zA-Z]+:.+# " $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.+# "}; {printf "%-20s %s\n", $$1, $$2}'
.PHONY: housekeeping
housekeeping: # Perform some git housekeeping
@git fsck
@git gc --aggressive
@git remote update --prune
.PHONY: release
release: check-version-args # Release the library to maven.Usage: make release <current-version> <next-version>
@./scripts/release.sh $(word 2,$(MAKECMDGOALS)) $(word 3,$(MAKECMDGOALS))
check-version-args:
@if [ "$(word 2,$(MAKECMDGOALS))" = "" ] || [ "$(word 3,$(MAKECMDGOALS))" = "" ]; then \
echo "Usage: make release <current-version> <next-version>"; \
exit 1; \
fi
%:
@: