-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
54 lines (42 loc) · 1.63 KB
/
justfile
File metadata and controls
54 lines (42 loc) · 1.63 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
alias b := build
alias t := test
alias f := format
alias l := lint
# Resolve the Gradle executable: prefer a local wrapper if present (generated by
# `gradle wrapper`), fall back to whatever is on PATH.
gradle := if path_exists("gradlew") == "true" { "./gradlew" } else { "gradle" }
# Kotlin/Native target for the current host.
test-task := if os() == "linux" { "linuxX64Test" } else if arch() == "aarch64" { "macosArm64Test" } else { "macosX64Test" }
shared-task := if os() == "linux" { "linkReleaseSharedLinuxX64" } else if arch() == "aarch64" { "linkReleaseSharedMacosArm64" } else { "linkReleaseSharedMacosX64" }
static-task := if os() == "linux" { "linkReleaseStaticLinuxX64" } else if arch() == "aarch64" { "linkReleaseStaticMacosArm64" } else { "linkReleaseStaticMacosX64" }
# list all available recipes
default:
@just --list --unsorted
# build the Ada native library and compile all targets
build:
{{gradle}} buildAdaLib compileKotlinLinuxX64 compileKotlinMacosX64 compileKotlinMacosArm64
# run tests for the current platform
test:
{{gradle}} {{test-task}}
# check formatting and linting with ktlint
lint:
{{gradle}} ktlintCheck
# auto-format all Kotlin sources with ktlint
format:
{{gradle}} ktlintFormat
# build a shared library for the current platform
build-shared:
{{gradle}} {{shared-task}}
# build a static library for the current platform
build-static:
{{gradle}} {{static-task}}
# run lint then tests (the same gate as CI)
check:
just lint
just test
# delete all build artefacts
clean:
{{gradle}} clean
# update the Ada single-header files to the latest release
update-ada:
.github/update-ada.sh