generated from VEuPathDB/example-jaxrs-container-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
85 lines (71 loc) · 1.64 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#
# Help/Usage
#
.PHONY: default
default:
@echo "Please choose one of:"
@echo ""
@echo " make install-dev-env"
@echo " Checks the development environment for initial build dependencies "
@echo " and downloads them if possible."
@echo ""
@echo " make raml-gen-code"
@echo " Generates Java classes representing API interfaces as "
@echo " defined in api.raml and child types."
@echo ""
@echo " make raml-gen-docs"
@echo " Generates HTML documentation files from the RAML API definition "
@echo " files."
@echo ""
@echo " make compile"
@echo " Compiles the existing code in 'src/'."
@echo ""
@echo " make test"
@echo " Compiles the existing code in 'src/' and runs unit tests."
@echo ""
@echo " make jar"
@echo " Compiles a 'fat jar' from this project and its dependencies."
@echo ""
@echo " make docker"
@echo " Builds a runnable docker image for this service"
@echo ""
#
# Development environment setup / teardown
#
.PHONY: install-dev-env
install-dev-env:
@./gradlew check-env
@npm i -g [email protected]
@npm i -g [email protected]
.PHONY: clean
clean:
@./gradlew clean
@rm -rf .bin .gradle
#
# Code & Doc Generation
#
.PHONY: raml-gen-code
raml-gen-code:
./gradlew generate-jaxrs
.PHONY: raml-gen-docs
raml-gen-docs:
./gradlew generate-raml-docs
#
# Build & Test Targets
#
.PHONY: compile
compile:
./gradlew clean compileJava
.PHONY: test
test:
./gradlew clean test
.PHONY: jar
jar: build/libs/service.jar
.PHONY: docker
docker:
./gradlew build-docker --stacktrace
#
# File based targets
#
build/libs/service.jar: build.gradle.kts
./gradlew clean test generate-raml-docs shadowJar