A native client for a LLeMbas instance on the server's /api/v2, and the phone's digital assistant. - Sign in by device code; the token sealed in the Android Keystore; several instances. - Chats and agent chats: the list, a chat with its reply streaming as JSON server-sent events (reconnecting, whole blocks), thinking, tool calls, steered messages, the plan, jobs, stop, edit, regenerate, continue, the model, effort and Plan mode, attachments and dictation. - Cards in a sheet, answered as the page's form says it; first answer wins. - Notifications through UnifiedPush, no Google services; an approval can be answered from its notification. - The digital assistant: a VoiceInteractionService with its session (a sheet over the current app, "Include screen" off by default), a recognition service through the instance's speech-to-text, the lock-screen path that asks to unlock before sending, a Quick Settings tile and an Ask shortcut. - Share to LLeMbas; Moria and Shire from the server's tokens; nine languages; a self-updater in the `full` flavour, none in `fdroid`. Generated and pinned from the server, each checked in CI: the theme (tokens.lock.json), the contract (contract/lock.json, server 2124ba9), the strings and the icons. Built and tested only on GitHub Actions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
96 files changed
+7932
No files matched your search
@@ -0,0 +1,63 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Nothing private in the repository
|
||||
run: scripts/hygiene.sh
|
||||
|
||||
- name: Generated files match their sources
|
||||
run: |
|
||||
python3 scripts/fetch-tokens.py # Tokens.kt matches tokens.lock.json
|
||||
python3 scripts/fetch-contract.py # contract/ matches contract/lock.json
|
||||
python3 scripts/gen-strings.py --check
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- name: ktlint (signature-checked)
|
||||
run: |
|
||||
curl -sSfL -o ktlint https://github.com/pinterest/ktlint/releases/download/1.8.0/ktlint
|
||||
echo "a3fd620207d5c40da6ca789b95e7f823c54e854b7fade7f613e91096a3706d75 ktlint" | sha256sum -c
|
||||
chmod +x ktlint
|
||||
./ktlint "app/src/**/*.kt" "*.kts" "app/*.kts"
|
||||
|
||||
- uses: gradle/actions/wrapper-validation@v4
|
||||
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Unit tests and both builds
|
||||
run: ./gradlew --no-daemon testFullDebugUnitTest assembleFullDebug assembleFdroidDebug
|
||||
|
||||
- name: Android lint (report only, for now)
|
||||
run: ./gradlew --no-daemon lintFullDebug
|
||||
continue-on-error: true
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: llembas-android-debug
|
||||
path: app/build/outputs/apk/*/debug/*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: reports
|
||||
path: |
|
||||
app/build/reports/
|
||||
app/build/test-results/
|
||||
if-no-files-found: ignore
|
||||
@@ -0,0 +1,76 @@
|
||||
name: Release
|
||||
|
||||
# A signed tag `vX.Y.Z` builds both flavours, signed with the release key from the secrets,
|
||||
# and publishes them with SHA256SUMS as the GitHub Release. The release notes are the tag's
|
||||
# message. The key never touches the repository: it is written to a temporary file here and
|
||||
# deleted with the runner.
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: Tag to build
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-24.04
|
||||
timeout-minutes: 40
|
||||
env:
|
||||
TAG: ${{ github.event.inputs.tag || github.ref_name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.TAG }}
|
||||
|
||||
- name: The tag object, for its message
|
||||
run: git fetch --force origin "refs/tags/$TAG:refs/tags/$TAG"
|
||||
|
||||
- name: The version is the tag
|
||||
run: |
|
||||
version="$(sed -n -E 's/^ *versionName = "([^"]+)".*/\1/p' app/build.gradle.kts)"
|
||||
[ "v$version" = "$TAG" ] || { echo "versionName $version is not $TAG" >&2; exit 1; }
|
||||
echo "VERSION=$version" >> "$GITHUB_ENV"
|
||||
|
||||
- run: scripts/hygiene.sh
|
||||
|
||||
- uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 17
|
||||
|
||||
- uses: gradle/actions/wrapper-validation@v4
|
||||
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Build, signed
|
||||
env:
|
||||
KEYSTORE_B64: ${{ secrets.LEMBAS_KEYSTORE_B64 }}
|
||||
LEMBAS_KEYSTORE_PASSWORD: ${{ secrets.LEMBAS_KEYSTORE_PASSWORD }}
|
||||
LEMBAS_KEY_ALIAS: ${{ secrets.LEMBAS_KEY_ALIAS }}
|
||||
LEMBAS_KEY_PASSWORD: ${{ secrets.LEMBAS_KEY_PASSWORD }}
|
||||
run: |
|
||||
[ -n "$KEYSTORE_B64" ] || { echo "no release key in the secrets" >&2; exit 1; }
|
||||
export LEMBAS_KEYSTORE="$RUNNER_TEMP/release.jks"
|
||||
echo "$KEYSTORE_B64" | base64 -d > "$LEMBAS_KEYSTORE"
|
||||
./gradlew --no-daemon testFullReleaseUnitTest assembleFullRelease assembleFdroidRelease
|
||||
rm -f "$LEMBAS_KEYSTORE"
|
||||
|
||||
- name: Name the files and sum them
|
||||
run: |
|
||||
mkdir dist
|
||||
cp app/build/outputs/apk/full/release/app-full-release.apk "dist/llembas-android-$VERSION.apk"
|
||||
cp app/build/outputs/apk/fdroid/release/app-fdroid-release.apk "dist/llembas-android-$VERSION-fdroid.apk"
|
||||
{ echo "# llembas-android $VERSION"; (cd dist && sha256sum *.apk); } > SHA256SUMS
|
||||
mv SHA256SUMS dist/
|
||||
|
||||
- name: Publish
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
git tag -l --format='%(contents)' "$TAG" | sed '/-----BEGIN SSH SIGNATURE-----/,$d' > notes.md
|
||||
gh release create "$TAG" --verify-tag --title "LLeMbas for Android $VERSION" --notes-file notes.md dist/*
|
||||
Reference in new issue
Block a user