Skip to content

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

docs: the add-on recipe asks for both wrappers

xbshengc51520a82ee3
diff --git a/docs/workflows/addon.md b/docs/workflows/addon.md
index eb6f12d3e..22ec66fd5 100644
--- a/docs/workflows/addon.md
+++ b/docs/workflows/addon.md
@@ -2,9 +2,10 @@
**When to use this:** a widget or tile that can be its own small app, shown through a module card.
-1. Create `addons/<name>/` as its own Gradle project (`settings.gradle`, its own `gradlew` wrapper and an `app`
- module), with its own package name. Copy the wrapper from an add-on that is already here: the add-on build
- refuses a folder without one.
+1. Create `addons/<name>/` as its own Gradle project (`settings.gradle`, its own `gradlew` and `gradlew.bat`
+ wrappers and an `app` module), with its own package name. Copy the two wrappers from an add-on that is
+ already here: the add-on build names `./gradlew` on macOS and Linux and `gradlew.bat` in a Command Prompt,
+ and `tests/test_addons.py` refuses a folder without either one.
2. It talks to the launcher only through the module-card contract (`docs/modules.md`, `docs/specs/card.md`).
Nothing under `launcher/` changes, and `launcher/` never mentions `addons/`. If the idea needs a launcher
change, it is not an add-on: open an issue.
diff --git a/tests/test_addons.py b/tests/test_addons.py
index 60a9687d7..912068eb5 100644
--- a/tests/test_addons.py
+++ b/tests/test_addons.py
@@ -143,6 +143,15 @@ class AddonBuildRouteTest(unittest.TestCase):
self.assertIn("gradlew.bat assembleRelease", page,
"addons/README.md builds an add-on in Command Prompt with gradlew.bat")
+ def test_the_recipe_asks_for_both_wrappers(self):
+ """docs/workflows/addon.md is what a new add-on is made from: it has to name both files."""
+ page = (ROOT / "docs" / "workflows" / "addon.md").read_text(encoding="utf-8")
+ step = page.split("\n1. ", 1)[1].split("\n2. ", 1)[0] if "\n1. " in page else ""
+ self.assertIn("gradlew", step, "the recipe's first step no longer names the wrapper")
+ self.assertIn("gradlew.bat", step,
+ "docs/workflows/addon.md asks for a `gradlew` and not its `gradlew.bat`, which this "
+ "test refuses: a folder made from the page fails on the Command Prompt route")
+
if __name__ == "__main__":
unittest.main()