Files
amethyst/.git-hooks/pre-push
T
Claude 2e8bf0d45d build: remove unused :ammolite module
The :ammolite module contained no production Kotlin/Java sources (just
a manifest, build.gradle, and proguard stubs) and no module in the
codebase imports com.vitorpamplona.ammolite.*.

Removes:
- ammolite/ directory (5 files)
- :ammolite project include in settings.gradle
- implementation project(':ammolite') from :amethyst
- androidTestImplementation project(':ammolite') from :benchmark
- :ammolite:testDebugUnitTest from CI workflow and pre-push hook
- -keep class com.vitorpamplona.ammolite.** rules from
  :amethyst, :commons, and :desktopApp proguard files
- Stale references in CONTRIBUTING.md, CLAUDE.md, and the
  gradle-expert skill dependency-graph doc

Small build-graph win: one fewer module to configure, compile, lint,
and spotless-check on every build, and one fewer unit-test target in
both CI and the local pre-push hook.
2026-05-16 14:40:03 +00:00

45 lines
1.3 KiB
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
echo "*********************************************************"
echo "Running git pre-push hook."
echo "*********************************************************"
echo ""
echo "Java Version: "
echo "$JAVA_HOME"
echo "$(java -version)"
echo "Running test... "
# Single-variant pre-push tests. `./gradlew test` would compile six Android
# variants of :amethyst (play/fdroid × debug/release/benchmark) plus full
# native-libs merging per variant — ~6× the work of one variant. CI runs the
# multi-flavor matrix on push to main; pre-push only needs one happy path.
TASKS=(
:quartz:jvmTest
:commons:jvmTest
:nestsClient:jvmTest
:quic:jvmTest
:amethyst:testPlayDebugUnitTest
:cli:test
)
if [ "${CLAUDE_CODE_REMOTE:-}" = "true" ]; then
./gradlew "${TASKS[@]}" --quiet
else
./gradlew "${TASKS[@]}" :desktopApp:test --quiet
fi
status=$?
if [ "$status" = 0 ] ; then
echo "All test passed."
exit 0
else
echo "*********************************************************"
echo 1>&2 "Failing test"
printf "Run ${GREEN}./gradlew test${NO_COLOR} to make sure you have all tests green before pushing...\n"
echo "*********************************************************"
exit 1
fi