-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
57 lines (45 loc) · 1.37 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
# Terminal Colours
RED?=$(shell tput setaf 1)
GREEN?=$(shell tput setaf 2)
YELLOW?=$(shell tput setaf 3)
BLUE?=$(shell tput setaf 4)
BOLD?=$(shell tput bold)
RST?=$(shell tput sgr0)
##@ Build
.PHONY: build
build: ## Build the project
@./gradlew build
.PHONY: release
release: ## Create a release archive
@./gradlew release
.PHONY: clean
clean: ## Clean everything up
@./gradlew clean
##@ Maintenance
.PHONY: check-cache
check-cache: ## Check cache contents and update if necessary
@scripts/check-cache.sh
.PHONY: check-client
check-client: ## Check client contents and update if necessary
@scripts/check-client.sh
.PHONY: update-core
update-core: ## Update core repository
@scripts/get-core-repository.sh
##@ Utility/CI
.DEFAULT_GOAL = help
.PHONY: run
run: ## Compile & run the project
@./gradlew run
.PHONY: build-javadoc
build-javadoc: ## Build API documentation
@./gradlew app:javadoc
@cp -r app/build/docs/javadoc public
.PHONY: check-format
check-format: ## Check if source code is properly formatted
@./gradlew spotlessCheck
.PHONY: format
format: ## Format source code
@./gradlew spotlessApply
.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n $(YELLOW)make$(RST) $(BLUE)command$(RST)\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " $(BLUE)%-15s$(RST) %s\n", $$1, $$2 } /^##@/ { printf "\n$(BOLD)%s$(RST)\n", substr($$0, 5) } ' $(MAKEFILE_LIST)