-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathjustfile
More file actions
68 lines (50 loc) · 1.88 KB
/
Copy pathjustfile
File metadata and controls
68 lines (50 loc) · 1.88 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
63
64
65
66
67
68
#!/usr/bin/env just --justfile
VERSION := env_var_or_default("VERSION", "")
# Gradle Variables
in_ci := env_var_or_default("GITHUB_ACTIONS", "")
gradlew_local := justfile_directory() + '/gradlew -p ' + justfile_directory()
gradlew_ci := 'TERM=dumb ' + gradlew_local + ' -q'
gradlew := if in_ci == "" { gradlew_local } else { gradlew_ci }
# Print a list of available recipes
_default:
@just --justfile {{justfile()}} --list --unsorted
# Build
build:
{{gradlew}} -configuration-cache build -x check --warning-mode all
# Deletes all build outputs & artifacts
clean:
{{gradlew}} -configuration-cache clean
# Build and publish to maven central
publish version=(VERSION):
VERSION="{{version}}" {{gradlew}} lintKotlin test publishAggregationToCentralPortal
# Build and publish to local maven repository (~/.m2)
publish-local version=(VERSION):
VERSION="{{version}}" {{gradlew}} lintKotlin test nmcpPublishAggregationToMavenLocal
# Run unit tests (when all="true" all tests will run, otherwise only outdated tests run)
test all="false":
{{gradlew}} -configuration-cache {{ if all == "true" { "cleanTest test" } else { "test" } }}
# Run Gradle checks (lint, test, complexity).
check:
{{gradlew}} -configuration-cache check
# Generate a code coverage report (via Jacoco).
coverage:
{{gradlew}} -configuration-cache jacocoTestReport
# Verify source code style.
lint:
{{gradlew}} -configuration-cache lintKotlin
# Format the source code.
format:
{{gradlew}} -configuration-cache versionCatalogFormat formatKotlin
# Calculates code complexity.
complexity:
{{gradlew}} -configuration-cache detekt
# Checks for library updates.
update-check:
{{gradlew}} dependencyUpdates -Drevision=release
# Automatically updates all dependencies in the version catalog.
update-apply:
{{gradlew}} versionCatalogUpdate
api-check:
{{gradlew}} apiCheck
api-dump:
{{gradlew}} apiDump