Repository navigation
ADFA-6207 | Add Share Your Apps, a plugin that publishes apps to a store on the local network - #163
Merged
Merged
Conversation
Copies the plugin and its companion server (server/) from LocalStoreCombined.zip, and renames Local Store to Share Your Apps in the plugin: package and plugin.id org.appdevforall.shareyourapps, pluginName share-your-apps, class, file and folder names, and display text. Names the unrenamed server still owns (its package, app name, share-protocol labels, log tags, keystore, APK asset name) are kept. Media files (webm, mp3, mp4) are gitignored.
…on and the gallery page The server's package and applicationId become org.appdevforall.shareyourapps.server, its app name Share Your Apps Server, and the share-link scheme, protocol labels, log tags, help category and APK asset name follow. The plugin's references to the server change with it. The server's help database is rebuilt from build_help_db.py. addon.json and share-your-apps.html make addons check pass.
scripts/server-signing-key.sh writes the server's release key from repository secrets to the runner and exports SERVER_SIGNING_*, which the server's build now reads before falling back to release.properties on the phone. The plugin's new downloadAssets task builds the server's release and bundles it; build-plugins.sh already runs that hook. The three plugin-building workflows call the script. In CI, without the key, downloadAssets stops rather than bundle an unsigned server. The design document again names the key's real file and alias, which the rename had changed.
The old Local Store Server key no longer exists, so the server has a new one: alias shareyourapps-server, RSA 4096, SHA-256 78:75:16:B7:...:45:C6. It's in the four SERVER_SIGNING_* repository secrets, and its file and password are kept by the maintainer.
…ndard toolchain The plugin used its own older copies of plugin-api.jar and gradle-plugin.jar, so its .cgp had no build provenance and verify-provenance.sh failed. It now uses ../../libs, like every other plugin, and the copies are gone. check-toolchain wants jvmTarget set to JvmTarget.JVM_17 and Kotlin pinned on the settings buildscript classpath. The server now keeps AGP and the Kotlin plugin there together (they must share a class loader) and applies AGP by id. downloadAssets uses tasks.register, which Gradle 9.6 prefers.
- dispose() now stops the plugin's work and lets go of its state: PublishFlow interrupts its threads, drops posted work and clears its Context, Intent and listeners; CatalogState saves, then shuts its writer down; the install receiver is unregistered; the static PluginContext is cleared. The fragment no longer calls requireContext() on a background thread. - The install result receiver, exported before Android 13, accepts only its own session's result and launches only a system app's confirmation screen, without URI grants. - The server locks a client out after 5 wrong PINs, for 30 s, doubling per further wrong PIN. - The APK picker also finds APKs in Code on the Go 26.45+'s relocated build tree (no_backup/gradle-build/<ProjectStorageKey>/main/*/outputs/apk). - The bottom-sheet tab has a tooltip tag. - The gallery page has the rubric's five sections. - Plugin 1.0.3; server versionCode 50, so the plugin installs the new server.
…e open items The review-blockers commit added a per-address PIN lockout and CI signing, but the design document and the review prompt still said there was no limit on PIN guesses, and listed signing in CI as future work.
…e missing Build addon artifacts, Publish addons and Update libs from CodeOnTheGo now start with a Pre-flight checks step. It checks the four SERVER_SIGNING_* secrets, and in the last two the R2 settings or the push token, which each had their own check that stopped at the first problem. It reports every missing prerequisite as an error, then fails the run. Before, a missing keystore secret only failed the build later, and a keystore secret without its passwords was reported as "release key is in place" and then failed inside packageRelease with "keystore password was incorrect". server-signing-key.sh no longer needs its own no-secret branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ADFA-6207
Summary
Adds Share Your Apps (
plugins/Share-Your-Apps/), imported from Local Store. The plugin turns the owner's apps into a small web store that phones on the same Wi-Fi network or hotspot open in a browser, with no internet and no accounts. A companion app, Share Your Apps Server (plugins/Share-Your-Apps/server/), serves the store on port 6175. The plugin bundles it and installs it on the first Publish.The design, limitations and open items are in
plugins/Share-Your-Apps/docs/share-your-apps-design.md. The tester checklist isdocs/qa-steps.md.Commits, in order:
addon.jsonand the gallery page.scripts/server-signing-key.shand adownloadAssetstask, wired into Build addon artifacts, Publish addons and Update libs from CodeOnTheGo. The key comes from the fourSERVER_SIGNING_*repository secrets, which are set. In CI,downloadAssetsstops rather than bundle an unsigned server.libs/and the standard toolchain./plugin-review:dispose()releases everything; the install receiver accepts only its own session and only a system confirmation activity; the APK picker finds builds in Code on the Go 26.45+'s relocated build folder; a tooltip on the tab; the gallery page's sections; and a PIN lockout — after 5 wrong PINs, an address waits 30 seconds, doubling up to an hour, with HTTP 429.SERVER_SIGNING_*secret, and in the last two the R2 settings or the push token, then fails the run before anything is built. The two existing early checks, which stopped at the first problem, are folded into it. Checked locally with every secret missing, one missing and none missing, and in CI (run 43144318626).Verified
addons checkexits 0.Share-Your-Appson this branch passes with the release key in place (run 43139907353). It built61e7f000; commit 7 changes only docs.CoreTestbinds127.0.0.2, which macOS lacks without an alias; Linux has it. CI runs neither suite.C-d-1031-1713), with the.cgpbuilt locally from61e7f000and the server signed with a throwaway key:Source ✓ APK ✓ 4.0 MB.Store_*.tetris-classic.apk, byte-identical to the build. The source zip holds nobuild/,.git, keystore orrelease.properties.Published Store_29716133 — 5 files verified., deletes the old folder, and the server serves the new one.Not yet verified
docs/qa-steps.md: QR codes, Wi-Fi and hotspot, sharing a store by code or sound, and the PIN lockout from a real buyer's phone.Known, not in this PR
ponytail:note inHttpServer.kt).server/CODE_REVIEW.mdlists older non-blocking items.docs/share-protocol-review.md).