diff options
Diffstat (limited to 'project_doot_widget_build.md')
| -rw-r--r-- | project_doot_widget_build.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/project_doot_widget_build.md b/project_doot_widget_build.md index 232cf84..6498dfa 100644 --- a/project_doot_widget_build.md +++ b/project_doot_widget_build.md @@ -5,6 +5,7 @@ metadata: node_type: memory type: project originSessionId: f8b83784-e0ed-462c-8310-7de6aadc9650 + modified: 2026-08-15T18:05:20.824Z --- **Always `git fetch github && git merge --ff-only github/master` before building.** First time this was done, the sandbox's checkout was 3 days stale and missing 90 commits (a full widget refactor plus recurrence/labels-projects/budgets/multi-day-events/text-size features) — the APK got built and published from that stale tree with none of it. Don't trust `git status`'s "ahead of X by N commits" framing without checking which remote — the `local` remote (`/site/git.terst.org/repos/doot.git`) hits a "dubious ownership" error in sandboxes and its stale tracking ref can make the branch look ahead when it's actually just behind `github/master`. Check divergence against `github/master` specifically (`git log --oneline master..github/master`), and don't run `git config --global --add safe.directory` to silence the `local` remote error without asking first — fixing it isn't necessary since `github` is the remote that matters for this workflow. @@ -28,3 +29,5 @@ metadata: **Publish location:** copy the built APK to `/site/static.terst.org/public/files/doot-widget.apk`, then `chown www-data:www-data` it. A `doot-widget.apk` already existed there from a prior session (this is the established convention/URL the user installs from), so this is an overwrite-in-place, not a new path. **How to apply:** This publish step is a plain static-file write, not a service restart or DB migration — it does **not** fall under the "only deploy on tungsten" rule in [[project-doot-prod]] (deploy host migrated from titanium to tungsten 2026-07-17). That rule is specifically about the doot *server* (systemctl restart, dashboard.db migrations). Publishing the widget APK to the static file server is safe to do from any sandbox as long as `/site/static.terst.org/public/files/` is reachable. + +**If the build OOM-kills on a RAM-constrained host** (hit on titanium, 3.8GB total RAM, 2026-07-16, building `assembleRelease`): the persistent gradle daemon + kotlin compile daemon each reserve ~512MB-1GB, and a stale daemon left over from a prior failed build compounds it. Check `free -h` first; if tight, `./gradlew --stop` and `pkill -f KotlinCompileDaemon` to reclaim memory, then build with `--no-daemon --max-workers=1 -Dorg.gradle.jvmargs="-Xmx1024m -XX:MaxMetaspaceSize=256m"` appended to whichever assemble command you're running. Not hit on tungsten as of 2026-08-14 (debug builds succeeded with no special flags) — this is a fallback for a constrained host, not the default recipe. |
