-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (43 loc) · 1.98 KB
/
Copy pathMakefile
File metadata and controls
62 lines (43 loc) · 1.98 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
.PHONY: default help clean build lint format detekt detekt-baseline tests uberjar uber \
cc run heroku logs versions upgrade-wrapper _require-gradle-version
GRADLE_VERSION := $(shell sed -n 's/^gradle-wrapper = "\(.*\)"/\1/p' gradle/libs.versions.toml)
default: help
help: ## Show this help (list of targets)
@awk 'BEGIN {FS = ":.*?## "; printf "Usage: make <target>\n\nTargets:\n"} \
/^[a-zA-Z0-9_-]+:.*?## / {printf " \033[36m%-22s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
clean: ## Remove build artifacts
./gradlew clean
build: ## Build the project (skips tests)
./gradlew build -x test
lint: ## Run Kotlinter and detekt
./gradlew lintKotlin detekt
format: ## Format Kotlin sources with kotlinter
./gradlew formatKotlin
detekt: ## Run detekt static analysis
./gradlew detekt
detekt-baseline: ## Generate detekt baseline file
./gradlew detektBaseline
tests: ## Run all tests
./gradlew --rerun-tasks check
uberjar: ## Build the fat jar
./gradlew uberjar
uber: uberjar ## Build and run the fat jar
java -jar build/libs/server.jar
cc: ## Continuous compilation (no tests)
./gradlew build --continuous -x test
run: ## Start the server on port 8080
./gradlew run
heroku: ## Push master to Heroku
git push heroku master
logs: ## Tail Heroku logs
heroku logs --tail
# Gradle's documented upgrade procedure: the first run rewrites
# gradle-wrapper.properties using the *old* wrapper jar; the second run
# regenerates the wrapper itself with the new version.
versions: ## Check for dependency updates (default target)
./gradlew dependencyUpdates --no-configuration-cache --no-parallel
upgrade-wrapper: _require-gradle-version ## Upgrade Gradle wrapper to version in libs.versions.toml
./gradlew wrapper --gradle-version=$(GRADLE_VERSION) --distribution-type=bin
./gradlew wrapper --gradle-version=$(GRADLE_VERSION) --distribution-type=bin
_require-gradle-version:
@[ -n "$(GRADLE_VERSION)" ] || { echo "ERROR: Could not determine gradle version from gradle/libs.versions.toml" >&2; exit 1; }