-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
62 lines (49 loc) · 1.6 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
59
60
61
62
# See https://tech.davis-hansson.com/p/make/
SHELL := bash
.DELETE_ON_ERROR:
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-print-directory
GRADLE ?= ./gradlew
.PHONY: all
all: lint generate build docs conformance ## Run all tests and lint (default)
.PHONY: build
build: ## Build the entire project.
$(GRADLE) build
.PHONY: docs
docs: ## Build javadocs for the project.
$(GRADLE) javadoc
.PHONY: checkgenerate
checkgenerate: generate ## Checks if `make generate` produces a diff.
@# Used in CI to verify that `make generate` doesn't produce a diff.
test -z "$$(git status --porcelain | tee /dev/stderr)"
.PHONY: clean
clean: ## Delete intermediate build artifacts
$(GRADLE) clean
.PHONY: conformance
conformance: ## Execute conformance tests.
$(GRADLE) conformance:conformance
.PHONY: help
help: ## Describe useful make targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-15s %s\n", $$1, $$2}'
.PHONY: generate
generate: ## Regenerate code and license headers
$(GRADLE) generate
.PHONY: lint
lint: ## Lint code
$(GRADLE) spotlessCheck
.PHONY: lintfix
lintfix: ## Applies the lint changes.
$(GRADLE) spotlessApply
.PHONY: release
release: ## Upload artifacts to Sonatype Nexus.
$(GRADLE) --info publish --stacktrace --no-daemon --no-parallel
$(GRADLE) --info releaseRepository
.PHONY: releaselocal
releaselocal: ## Release artifacts to local maven repository.
$(GRADLE) --info publishToMavenLocal
.PHONY: test
test: ## Run all tests.
$(GRADLE) test