From 726e5e0a202ccbf9f6287212fbc5e54f6cf61538 Mon Sep 17 00:00:00 2001 From: PJ Date: Sun, 31 May 2026 15:56:30 +0530 Subject: [PATCH] fix(build): rebuild sidecar JAR when Kotlin sources change Without source-file deps on $(SIDECAR_JAR), make never re-ran shadowJar after a Kotlin edit, so a stale embedded JAR shipped on every install and the new sidecar code was silently absent at runtime. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 60388b9..69b345f 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ BUF := buf GO_PACKAGES := ./... SIDECAR_JAR := sidecar/build/libs/sidecar-all.jar SIDECAR_EMBED := internal/sidecar/assets/sidecar-all.jar +SIDECAR_SRC := $(shell find sidecar/src -type f \( -name '*.kt' -o -name '*.kts' \) 2>/dev/null) build.gradle.kts settings.gradle.kts SANDERLING_BIN := bin/sanderling DOCS_SRC := $(shell find docs -type f -name '*.md' -not -path 'docs/_*') @@ -61,7 +62,7 @@ inspect-dev: $(SIDECAR_EMBED) web-typecheck: cd inspect-ui && bun install --frozen-lockfile && bun run typecheck -$(SIDECAR_JAR): +$(SIDECAR_JAR): $(SIDECAR_SRC) ANDROID_HOME=$(ANDROID_HOME) $(GRADLE) :sidecar:shadowJar $(SIDECAR_EMBED): $(SIDECAR_JAR)