mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
- Run :commonsUI:testAndroidHostTest in CI and the pre-push hook. The moved SafeImeInsetsTest lives there and nothing ran it. - Emoji text: one implementation behind both CustomEmojiChecker and CreateTextWithEmoji overloads. The emoji path now keys its merged style on color, weight and size (it kept the first ones), and passes textAlign through InLineIconRenderer (a centered name with a custom emoji was drawn left-aligned, e.g. the audio-room participant grid). - ClickableInLineIconRenderer remembers its inline content and text and reuses the shared builder; it rebuilt both on every recomposition. - RenderCustomEmoji delegates to CreateTextWithEmoji, so shared rich text and names resolve emojis on the same path. - LocalAnimationsEnabled is provided by AmethystTheme from the global feature set, so every activity root has it. The app's CrossfadeIfEnabled wrapper is gone; its 39 callers use the shared one and drop the accountViewModel argument. - KeyboardState / ImeSettler KDoc links point at the moved SafeImeInsets. - iOS getText checks hasStrings before reading the pasteboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0168wY9t7i9NC5u3svyMxEz6
57 lines
1.9 KiB
Bash
Executable File
57 lines
1.9 KiB
Bash
Executable File
#!/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.
|
||
#
|
||
# Every KMP module's tests live under <module>:jvmTest - the Kotlin Multiplatform
|
||
# plugin registers no plain `test` task - so a module missing from this list is a
|
||
# module nobody runs before pushing. Add new KMP modules here when they gain tests.
|
||
#
|
||
# `./gradlew test` now reaches the KMP modules too (see the `test` alias in the root
|
||
# build), but this hook stays explicit: a bare `test` would also pull in :desktopApp:test,
|
||
# which needs a display server and is deliberately skipped on CLAUDE_CODE_REMOTE below.
|
||
TASKS=(
|
||
:quartz:jvmTest
|
||
:commons:jvmTest
|
||
:commonsUI:jvmTest
|
||
# Android-only commonsUI code (e.g. SafeImeInsets) is tested here, not in jvmTest.
|
||
:commonsUI:testAndroidHostTest
|
||
:nestsClient:jvmTest
|
||
:quic:jvmTest
|
||
:marmotQuic: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
|