-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
51 lines (36 loc) · 1.12 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
.PHONY: check run test lines md default jacoco spotless kover diktat cloc jar repo
# Run detekt + ktlint
check:
./gradlew detekt ktlintCheck --profile --daemon
# Run spotless, more info: https://github.com/diffplug/spotless
spotless:
./gradlew spotlessApply spotlessCheck spotlessKotlin
# Update the README.md file in accordance with the detekt report
md:
truncate -s0 README.md && cat config/main.md >> README.md && cat build/reports/detekt/metrics.md >> README.md && cat build/reports/detekt/complexity.md >> README.md
# Copy jacoco report
jacoco:
cp -r build/reports/jacoco/test/html jacocoReport
# Run code style check + update the README.md file in accordance with the detekt report
default:
make spotless && make check && make repo && make md
# Build the project
run:
./gradlew build
# Run tests
test:
./gradlew test
# Print Kotlin lines count
lines:
find . -name '*.kt' | xargs wc -l
cloc:
cloc --include-lang=kotlin src/main
kover:
./gradlew koverHtmlReport
diktat:
./gradlew diktatCheck
jar:
./gradlew shadowJar && mv ./build/libs/*.jar config/
repo:
./gradlew detektReportToMdTask
.DEFAULT_GOAL := default