-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathjustfile
More file actions
47 lines (40 loc) · 1.21 KB
/
Copy pathjustfile
File metadata and controls
47 lines (40 loc) · 1.21 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
default:
just --list --unsorted
@devices:
adb devices
# Run the app in an emulator or on a device (list your connected devices using `just devices`)
run DEVICE="":
./kotlin run {{ if DEVICE == "" { "" } else { "--device-id=" + DEVICE } }}
# Build the docs website
docs-build:
uv run zensical build
# Serve the docs locally
docs-serve:
uv run zensical serve
docs-clean:
rm -rf .venv/
rm -rf .cache/
rm -rf site/
# Format app using ktfmt 0.64
format:
#!/usr/bin/env bash
set -euo pipefail
version=$(ktfmt --version | grep -oE '[0-9]+\.[0-9]+')
if [ "$version" != "0.64" ]; then
echo "Error: ktfmt 0.64 is required, but found $version" >&2
exit 1
fi
ktfmt --kotlinlang-style --enable-editorconfig src/
# Check formatting using ktfmt 0.64 without modifying files
format-check:
#!/usr/bin/env bash
set -euo pipefail
version=$(ktfmt --version | grep -oE '[0-9]+\.[0-9]+')
if [ "$version" != "0.64" ]; then
echo "Error: ktfmt 0.64 is required, but found $version" >&2
exit 1
fi
if ! ktfmt --kotlinlang-style --enable-editorconfig --dry-run --set-exit-if-changed src/ > /dev/null; then
echo "Error: formatting issues found. Run 'just format' to fix them." >&2
exit 1
fi