Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

Tests and the translation recipe follow the 576 KB APK gate

Gathin23c1946b5b7622
diff --git a/docs/workflows/translation.md b/docs/workflows/translation.md
index 81a1d4305..5cb285d9b 100644
--- a/docs/workflows/translation.md
+++ b/docs/workflows/translation.md
@@ -26,7 +26,7 @@
needs its strings in every locale.
6. Moving hard-coded text into resources is welcome; do not bundle unrelated build changes with it.
7. Check the size gate before you push. A language's strings ship in the release APK, and that APK has to
- stay under 524,288 B (512 KB): `launcher/app/build/outputs/apk/release/app-release.apk`, measured with
+ stay under 589,824 B (576 KB): `launcher/app/build/outputs/apk/release/app-release.apk`, measured with
`stat -c %s` on Linux or `stat -f %z` on macOS, and checked by the "Launcher build and unit tests" job
on every pull request. `README.md` quotes the launcher at about 503 KB, so a full language can be the
difference between green and a failed build. A language that does not fit is a maintainer decision, not
diff --git a/tests/test_translation_recipe_gate.py b/tests/test_translation_recipe_gate.py
index c4c2e06a8..b2a52c423 100644
--- a/tests/test_translation_recipe_gate.py
+++ b/tests/test_translation_recipe_gate.py
@@ -4,7 +4,7 @@
in `values/strings.xml`, so a full language is by far the largest thing a translation pull request
adds to `launcher/app/src/main/res/` - and the release APK has a hard budget:
`.github/workflows/ci.yml`'s `launcher` job, which runs on every pull request in `launcher/`, measures
-`launcher/app/build/outputs/apk/release/app-release.apk` and fails the build at 524,288 B. The launcher
+`launcher/app/build/outputs/apk/release/app-release.apk` and fails the build at 589,824 B. The launcher
ships just under that (README.md quotes about 503 KB), and #1271 is a full Korean translation that did
not fit. Until now the page said nothing about it, so a translator could follow the recipe exactly and
land a red build at a step the page never mentions.
@@ -25,7 +25,7 @@ CI = ROOT / ".github/workflows/ci.yml"
# The launcher job's size check, in the form ci.yml writes it:
# size=$(stat -c %s launcher/app/build/outputs/apk/release/app-release.apk)
-# test "$size" -lt 524288
+# test "$size" -lt 589824
STAT_LINE = re.compile(r"size=\$\(stat -c %s ([^)\s]+)\)")
LIMIT_LINE = re.compile(r'test "\$size" -lt (\d+)')
JOB_HEAD = re.compile(r"^ ([a-z][a-z0-9-]*):\s*$", re.M)
@@ -105,7 +105,7 @@ class TranslationRecipeGateTest(unittest.TestCase):
ci = CI.read_text(encoding="utf-8")
apk, limit = gate(ci)
self.assertEqual("launcher/app/build/outputs/apk/release/app-release.apk", apk)
- self.assertEqual(524288, limit)
+ self.assertEqual(589824, limit)
self.assertTrue(runs_on_pull_requests(ci),
"ci.yml's launcher job no longer runs on a pull request, so a translation PR "
"would not meet the gate docs/workflows/translation.md now points at")