Three APKs: the notification listener leaves the standard builds; releases drop x86_64
CI / check (push) Canceled after 0s

Google Play Protect blocked installing beta.7, most likely for the
notification listener (notification summaries).

- A second flavour dimension, `reading`: `standard` declares no listener and
  no permission of it; `notifications` is the full build plus the listener,
  with the same application id and key. Variants: fullStandard,
  fullNotifications, fdroidStandard (no F-Droid build with the listener).
  The listener class and its manifest entry live in src/notifications only.
- Settings in a standard build says where notification summaries went and
  why. The self-updater installs only its own kind: a notifications build
  takes latest.json's optional `notifications {url, sha256}` or nothing.
- Release builds carry arm64-v8a and armeabi-v7a only; debug keeps x86_64
  for the emulator. The engine's unused C and C++ API libraries are left out.
- scripts/check-apk.sh checks the built files (listener only where it may
  be, model stored, no x86 in a release); CI runs it on the three debug APKs
  and on an unsigned release build, release.yml on what it publishes.
- release.yml publishes llembas-android-<version>.apk, -notifications.apk
  and -fdroid.apk with SHA256SUMS.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Fable 5.2 committed 2026-11-12 09:58:07 +00:00
1 parent 6a05f56e7c
commit f2a2acf996
28 files changed
+403 -140

No files matched your search

@@ -1,10 +1,14 @@
package eu.llembas.android
import eu.llembas.android.api.LembasJson
import eu.llembas.android.assist.AssistController
import eu.llembas.android.assist.Recorder
import eu.llembas.android.update.Latest
import eu.llembas.android.update.LatestFile
import eu.llembas.android.update.Updater
import org.junit.Assert.assertEquals
import org.junit.Assert.assertFalse
import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue
import org.junit.Test
@@ -17,6 +21,20 @@ class SmallThingsTest {
assertFalse(Updater.newer("0.1.0", "0.2.0"))
}
@Test
fun aBuildUpdatesItselfToItsOwnKindOnly() {
val plain = LembasJson.decodeFromString(Latest.serializer(), """{"version":"1.0.0","url":"https://example.org/a.apk","sha256":"aa"}""")
assertEquals(LatestFile("https://example.org/a.apk", "aa"), plain.fileFor(notificationsBuild = false))
// A release that names no notifications APK: that build installs nothing, rather than lose its listener.
assertNull(plain.fileFor(notificationsBuild = true))
val both = LembasJson.decodeFromString(
Latest.serializer(),
"""{"version":"1.0.0","url":"https://example.org/a.apk","sha256":"aa","notifications":{"url":"https://example.org/a-notifications.apk","sha256":"bb"}}""",
)
assertEquals(LatestFile("https://example.org/a-notifications.apk", "bb"), both.fileFor(notificationsBuild = true))
assertEquals(LatestFile("https://example.org/a.apk", "aa"), both.fileFor(notificationsBuild = false))
}
@Test
fun aVoiceReadsNoMarkup() {
val said = AssistController.plain("**Bake** it.\n\n```sh\nbake\n```\nSee [the recipe](https://example.org).")