summaryrefslogtreecommitdiffstats
path: root/Makefile
blob: d28fbc180ce4c9db348a4ddc1724b7cb4a201571 (plain)
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
GRADLE ?= ./gradlew

.DEFAULT_GOAL := help
.PHONY: help test lint format build check clean

help:
	@echo 'Targets:'
	@echo '  test       run the test suite'
	@echo '  lint       ktlint, read-only'
	@echo '  format     apply ktlint (writes)'
	@echo '  build      assemble the jar and sources jar into build/libs/'
	@echo '  check      lint + test + build, in that order'
	@echo '  clean      remove build artefacts and caches'
	@echo
	@echo 'Override the build tool with e.g. make test GRADLE=gradle'

test:
	$(GRADLE) test

lint:
	$(GRADLE) ktlintCheck

format:
	$(GRADLE) ktlintFormat

build:
	$(GRADLE) assemble

check: lint test build

clean:
	$(GRADLE) clean
	rm -rf .gradle .kotlin build