From 2860f1de75af1d44d35292ecbf79c68f02409d19 Mon Sep 17 00:00:00 2001 From: Christophe Besson Date: Thu, 8 Oct 2026 11:40:17 +0200 Subject: feat: sign Android releases with the release key assembleRelease reads the key from ~/.gradle/gradle.properties and fails without it instead of falling back to the debug key. Co-Authored-By: Claude Opus 5.5 --- packages/meshbay-hub/tests/test_android_shell.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'packages/meshbay-hub/tests') diff --git a/packages/meshbay-hub/tests/test_android_shell.py b/packages/meshbay-hub/tests/test_android_shell.py index e569bb7..71832f2 100644 --- a/packages/meshbay-hub/tests/test_android_shell.py +++ b/packages/meshbay-hub/tests/test_android_shell.py @@ -215,6 +215,17 @@ def test_the_version_is_the_packages_version(): assert not re.search(r'versionName = "\d', build) +def test_a_release_is_signed_with_the_release_key_or_not_built(): + """The key's path and passwords come from outside the repository, and a + release build without them stops instead of signing with the debug key.""" + build = _strip_js_comments(_read(APP / "build.gradle.kts")) + assert 'signingConfigs.getByName("debug")' not in build + assert 'signingConfigs.findByName("release")' in build + assert 'providers.gradleProperty("meshbayReleaseStorePassword")' in build + assert '"preReleaseBuild"' in build and "throw GradleException" in build + assert not re.search(r'storePassword = "', build) + + @pytest.mark.skipif(not os.environ.get("ANDROID_HOME") or shutil.which("java") is None, reason="no Android SDK in the environment") def test_the_jvm_unit_tests_pass(): -- cgit v1.2.3