diff --git a/.bb-env-setup.sh b/.bb-env-setup.sh new file mode 100755 index 00000000..cd897e8b --- /dev/null +++ b/.bb-env-setup.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Sets up a fresh worktree: trusts mise.toml, installs the pinned JDK, and compiles everything once so the +# first real Gradle run starts from a warm build. +# +# bb runs this for worktrees it creates itself; for worktrees made with `git worktree add` (see .bb/AGENTS.md +# of the workspace) the agent runs it by hand from the worktree root. +set -euo pipefail + +# mise refuses to read a mise.toml it has not been told to trust, and a new worktree is a new path. +mise trust +# Temurin 21, which Gradle finds through its asdf provider (see gradle.properties). +mise install + +# Compiles every module's main classes, no tests. A failure here should not stop the worktree from opening. +./gradlew --console=plain compileJava || echo "warning: ./gradlew compileJava failed, the worktree is still usable" >&2 diff --git a/.worktreeinclude b/.worktreeinclude new file mode 100644 index 00000000..192430ed --- /dev/null +++ b/.worktreeinclude @@ -0,0 +1,6 @@ +# Untracked files copied from the source checkout into a new worktree (gitignore syntax). +# Nothing is needed today; add local-only files here, for example: +mise.local.toml +.env +.env.* +!.env.example