-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathjustfile
More file actions
52 lines (41 loc) · 1.83 KB
/
Copy pathjustfile
File metadata and controls
52 lines (41 loc) · 1.83 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
native_target := `rustc -vV | grep host | awk '{print $2}'`
ext_dir := if os() == "macos" { env("HOME") / "Library/Application Support/Zed/extensions/work/java" } else if os() == "linux" { env("HOME") / ".local/share/zed/extensions/work/java" } else { env("LOCALAPPDATA") / "Zed/extensions/work/java" }
proxy_bin := ext_dir / "bin" / "java-lsp-proxy"
bridge_bin := ext_dir / "bin" / "gradle-lsp-bridge"
# Build proxy in debug mode
proxy-build:
cargo build --target {{ native_target }} -p java-lsp-proxy
# Build proxy in release mode
proxy-release:
cd proxy && cargo build --release --target {{ native_target }}
# Build proxy release and install to extension workdir for testing
proxy-install: proxy-release
mkdir -p "{{ ext_dir }}/bin"
cp "target/{{ native_target }}/release/java-lsp-proxy" "{{ proxy_bin }}"
@echo "Installed to {{ ext_dir }}"
# --- Core recipes ---
# Build gradle-lsp-bridge in debug mode
bridge-build:
cargo build --target {{ native_target }} -p gradle-lsp-bridge
# Build gradle-lsp-bridge in release mode
bridge-release:
cargo build --release --target {{ native_target }} -p gradle-lsp-bridge
# Build gradle-lsp-bridge release and install to extension workdir for testing
bridge-install: bridge-release
mkdir -p "{{ ext_dir }}/bin"
cp "target/{{ native_target }}/release/gradle-lsp-bridge" "{{ bridge_bin }}"
@echo "Installed to {{ ext_dir }}"
# Build WASM extension in release mode
ext-build:
cargo build --release
# Format all code
fmt:
cargo fmt --all
ts_query_ls format languages
# Run clippy on all workspace crates (WASM extension + native binaries)
clippy:
cargo clippy --workspace --all-targets --fix --allow-dirty
# Format and clippy all code
lint: fmt clippy
# Build everything: lint, extension, and install proxy & bridge
all: lint ext-build proxy-install bridge-install