Files
breeze/scripts/check-android-optimization.sh
T
waozi b3e86113a6 Sharpen Sun Salutation, fix the neck and plank, and lead with the pose
The characters were drawn from 500-pixel frames that phones stretched to
about twice their size, so they looked soft. The frames are now exported at
twice the resolution and stay crisp on a 1080p phone; smaller screens scale
them down cleanly. The animation PNG size budget is gone.

The neck no longer looks like a capsule stuck to the head: it bends
between the top and the head, so a lifted head no longer swings it out of
the collar in half lift and plank, and a soft shade under the jaw sets the
head on it. In plank the head stays in line with the spine, looking at the
floor just ahead of the hands; the hips sit a little lower with the
shoulders still over the wrists, so the body reads as one straight line;
and the back of the shirt settles against the hips instead of sticking up.

The pose to move into is now the bold main line, with Breathe in or
Breathe out smaller beneath it.
2026-10-17 02:23:15 -03:00

37 lines
1.3 KiB
Bash

#!/usr/bin/env bash
# Verify the actual distributable, not merely the Gradle configuration.
set -euo pipefail
bundle="${1:-droid/app/build/outputs/bundle/gplay/app-gplay.aab}"
mapping='BUNDLE-METADATA/com.android.tools.build.obfuscation/proguard.map'
if [[ ! -s "$bundle" ]]; then
echo "FAIL: missing Play bundle: $bundle" >&2
exit 1
fi
python3 scripts/check-package-size.py "$bundle"
dex_bytes=$(unzip -l "$bundle" | awk '$4 ~ /\/dex\/classes[0-9]*\.dex$/ { total += $1 } END { printf "%.0f", total }')
if (( dex_bytes <= 0 || dex_bytes >= 10000000 )); then
echo "FAIL: Play DEX size is $dex_bytes bytes; Inbe must stay below its 10 MB release budget." >&2
exit 1
fi
# R8 embeds this mapping in optimized bundles. Renamed classes demonstrate
# obfuscation ran, but this is NOT Google's proprietary obfuscation percentage.
renamed=$(unzip -p "$bundle" "$mapping" | awk '
/^# compiler: R8$/ { r8 = 1 }
/^[^ #].* -> .*:$/ {
name = $3
sub(/:$/, "", name)
if ($1 != name && name !~ /R8\$\$REMOVED/) renamed++
}
END {
if (!r8 || !renamed) exit 1
print renamed
}') || {
echo 'FAIL: bundle is missing an R8 mapping with obfuscated classes.' >&2
exit 1
}
echo "PASS Play optimization: $dex_bytes uncompressed DEX bytes; $renamed renamed classes; embedded R8 mapping."