commit f6c1afd07c60a04f1bfea18501940a9d24ebfdc5 parent 5a47cecfb84d856a800317ddc2831d0ae9f5aeed Author: triesap <tyson@radroots.org> Date: Tue, 11 Aug 2026 04:18:03 +0000 build: clean included build outputs - clean the Gradle application build in the selected mode - clean the included build-logic projects in the selected mode - assert both clean invocations in the build-mode contract - prove a clean included build can rebuild successfully Diffstat:
| M | Makefile | | | 1 | + |
| M | tools/test-build-modes.sh | | | 10 | ++++++++++ |
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile @@ -150,3 +150,4 @@ clean: doctor $(BUILD_RUNNER) $(CARGO) clean --manifest-path $(CARGO_MANIFEST) $(BUILD_RUNNER) $(CARGO) clean --manifest-path $(XTASK_MANIFEST) $(BUILD_RUNNER) $(GRADLE) --no-daemon clean + $(BUILD_RUNNER) $(GRADLE) --no-daemon -p build-logic clean diff --git a/tools/test-build-modes.sh b/tools/test-build-modes.sh @@ -29,6 +29,16 @@ for lane in source-check integration-check; do done done +for mode in standalone governed; do + clean_output=$(PATH="$fixture:$PATH" "$make_command" --no-print-directory -n BUILD_MODE="$mode" -C "$repository_root" clean) + root_clean_count=$(printf '%s\n' "$clean_output" | grep -Ec '(^| -- )\./gradlew --no-daemon clean$') + included_clean_count=$(printf '%s\n' "$clean_output" | grep -Ec '(^| -- )\./gradlew --no-daemon -p build-logic clean$') + if [ "$root_clean_count" -ne 1 ] || [ "$included_clean_count" -ne 1 ]; then + printf '%s\n' "clean in $mode mode must clean the root and included builds exactly once" >&2 + exit 1 + fi +done + if "$make_command" --no-print-directory -C "$repository_root" BUILD_MODE=unsupported help > "$fixture/unknown.log" 2>&1; then printf '%s\n' 'unknown build mode was accepted' >&2 exit 1