- Java 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| app | ||
| .gitignore | ||
| build.gradle.kts | ||
| gradle.properties | ||
| LICENSE | ||
| README.md | ||
| settings.gradle.kts | ||
grid-sample-android
A tiny Android app and four instrumented tests. It exists so a first Grid run has something to run: one app APK and one matching test APK that pass on any phone with Android 8 or later.
- App:
org.gridsample.app. One screen with a title, a counter and a button. No network, no permissions, no libraries. - Tests:
org.gridsample.app.test(runnerandroidx.test.runner.AndroidJUnitRunner), classorg.gridsample.app.MainActivityTest: launches, shows the title, tapping counts up, the count survives recreation. All four are expected to pass. - minSdk 26, targetSdk 36.
Get the APKs
Each tag (v*) builds two files and a SHA256SUMS file. They are published with each Grid release under https://dl.fjord.sh/grid/sample/<version>/; the same files are the grid-sample-apks artifact of the tag's workflow run.
grid-sample-debug.apk(the app)grid-sample-debug-androidTest.apk(its tests; the name containsandroidTest, as the Grid console expects)
Check them with sha256sum -c SHA256SUMS. Both files are signed with the same debug key from one build, so a test run accepts the pair; do not mix files from different builds. A different build is signed with a different debug key, so uninstall the old copy before installing a newer one by hand (a Grid run removes the app and its tests when it ends). These files are not signed by the Grid publisher key.
In the Grid console, put both files on your node (Settings, Nodes, Upload a build), then run them from your enrolled phone's Runs tab. A pass is Passed with 4 tests passed.
Build it yourself
You need JDK 17, the Android SDK (platform 36, build-tools 36.0.0) and Gradle 9.4.1 (no wrapper is committed):
gradle :app:assembleDebug :app:assembleDebugAndroidTest
The files appear under app/build/outputs/apk/. To run the tests on a connected phone: gradle :app:connectedDebugAndroidTest.
.forgejo/workflows/release-apks.yml builds on version tags (v*) with pinned actions, a pinned and checksum-verified Gradle and Android command-line tools, and no secrets.
Licence
MIT, see LICENSE.
Screen orientation
The app is locked to portrait. Some phones on a dock or stand report a landscape orientation, and the display rotated while the first test tap was being sent, which dropped the tap. Android 16 and later ignore the lock on large screens, so each test that taps also waits (at most 5 s) for the display rotation to hold still first.