3.1 KiB
3.1 KiB
Stitch — working rules
Keep the documentation current (standing rule)
Updating the docs is part of finishing a change, not an optional extra. In the same turn as any feature, bug fix, or release:
DEVELOPMENT_HISTORY.md— update whichever of these the change touches:- Release history table (version, time, trigger, content)
- Timeline
- Problems, blockers and fixes — symptom → root cause → fix → version. Record failed attempts and process mistakes too; the audit trail is the point.
- Testing & verification audit — what was tested, and what is still untested
- Project metrics — re-measure (tests, tools, eval), never estimate
- Known limitations & open risks
README.md— when setup or user-facing behaviour changes.- Mention the doc update in one line at the end of the report to the owner.
Keep the plain-language style: the owner is not an Android developer.
Release checklist
export JAVA_HOME=~/.jdks/jdk-17.0.20.1+1
./gradlew testDebugUnitTest assembleRelease # tests must pass
cp app/build/outputs/apk/release/app-release.apk dist/Stitch-<version>.apk
~/Android/Sdk/build-tools/35.0.0/aapt dump badging dist/Stitch-<version>.apk | head -1 # verify version
- Work on
develop(or afeature/<name>branch off it). For a release, branchrelease/<version>fromdevelop, bump the version there, build, test, then merge intomainand back intodevelop. - Tag it:
v<version>-alpha.N(tests pass),-beta.N(phone checklist passed), plainv<version>(used on the phone without problems). Push branches and tags, then create the Gitea release (pre-release for alpha/beta) and attach the APK. Token:~/.config/gitea/token, passed per command with-c http.extraHeader, never stored in the repo config; send a normal User-Agent to the Gitea API (it rejects Python's default with a 403). Gitea orders releases by the tag's date: a tag made after the fact must be given the real release date (GIT_COMMITTER_DATE), or it jumps to the top of the Releases tab. - Stitch is open source (Apache 2.0). New source files start with the SPDX header
(
// SPDX-FileCopyrightText: 2026 Mohammed Khalid/// SPDX-License-Identifier: Apache-2.0); code adapted from elsewhere is credited inNOTICE. Never commit personal data: real contact names or numbers, private addresses, keys or tokens. Examples use made-up names. - Bump
versionCodeandversionNameinapp/build.gradle.ktsfirst. - Never copy the APK before confirming the build succeeded (a stale copy once shipped as a new version).
- Signing: leave the default (debug key) so builds install over the owner's phone.
-PreleaseKeyswitches to the real key at~/.stitch-release-key/and makes the APK refuse to install over the current app — only use it for the deliberate cutover indocs/SIGNING.md. - Emulator:
./gradlew assembleDebug -Pemulator(x86_64 Needle stub); grant/dev/kvmwithsetfacland remove it afterwards. - Needle eval:
python3 tools-dev/needle/run_eval.py ~/.cache/stitch-dl/needle/linux-x86_64/needle app/build/needle-tools.json 0.4— "wrong" must stay 0.