Restructure on the Android Studio project layout and update the toolchain - #123
Merged
Conversation
…hain - Gradle 9.7.1, AGP 9.4.0, Kotlin 2.4.20, Compose BOM 2026.08.00, compileSdk/targetSdk 37; version catalog shared with port-relay - Standard Android Studio layout: java/ source sets in both modules, theme/, ui/<feature>/, backup and data-extraction rules that exclude all app data, per-module .gitignore - Navigation 3 back stack (NavigationKeys + MainNavigation) replaces the hand-rolled Screen enum in MainActivity - SecurePreferences (AndroidKeyStore AES-256-GCM) replaces the deprecated Jetpack Security EncryptedSharedPreferences; the old store file is deleted on first load - Battery exemption: open the system optimization list instead of requesting REQUEST_IGNORE_BATTERY_OPTIMIZATIONS - Notification permission checked inline before notify(); KTX edit/toUri; obsolete SDK_INT branches removed (minSdk 26) - Release build minified with R8; smbj keep rules and precise dontwarn entries for its dormant javax.el / Kerberos paths - Kotlin warnings and lint warnings fail the build in every module - Compose UI test for ProtocolPickerScreen, instrumented test for SecurePreferences - CI runs unit tests and lint before the release build and uploads reports
- app/build.gradle.kts loads keystore.properties (project root, or ~/.android/release/ on a developer machine) the way the Android signing guide describes; without it the release stays unsigned - -PreleaseVersion=X.Y.Z sets versionName and a derived monotonic versionCode; release.yml passes it from the vX.Y.Z tag - release.yml: on a version tag, install the keystore from secrets, run unit tests and lint, build and verify the signed APK, attach it to a GitHub Release with gh, and remove the keystore afterwards - keystore files ignored by git
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.
Moves the project onto the standard Android Studio layout and the current toolchain, so that remote-sync and port-relay-android are built the same way from the same version catalog. Behaviour is unchanged except where a deprecated API had to go.
gradle/libs.versions.tomlis byte-identical to the one in port-relay-android.java/source sets in both modules,theme/,ui/<feature>/, per-module.gitignore, backup and data-extraction rules that exclude every app file (the config store holds SMB credentials).NavigationKeys+MainNavigationreplace the hand-rolledScreenenum inMainActivity. The back stack is saveable, so the setup form survives process death; the first-run picker stays the root until a pair exists, and Home becomes the root once one does.remote-sync-securefile is deleted on first load; pre-release installs re-enter their pairs.REQUEST_IGNORE_BATTERY_OPTIMIZATIONSis dropped; Settings now opens the system optimization list instead of the direct dialog.proguard-rules.prokeeps smbj and declares the exactjavax.el/org.ietf.jgssclasses its dormant EL-filter and Kerberos paths reference; neither exists on Android and neither path is taken with NTLM.allWarningsAsErrorsin both modules andlint { warningsAsErrors = true }. The one acknowledged lint isScopedStorageonMANAGE_EXTERNAL_STORAGE; the manifest comment records why SAF cannot replace it yet (no atomic replace-rename) and that it is the planned follow-up.ProtocolPickerScreenand an instrumented round-trip/tamper test forSecurePreferences(compile-checked only; no device in this run).assembleRelease; lint and test reports are uploaded alongside the APK.Not yet verified on a device: the R8-minified release path through an actual SMB sync.
Release signing (second commit) —
app/build.gradle.ktsloadskeystore.propertiesfrom the project root (or~/.android/release/on a developer machine) exactly as the Android signing guide describes, and leaves the release unsigned when neither exists.release.ymlruns on avX.Y.Ztag: it writeskeystore.propertiesfrom the fourSIGNING_*secrets, runs tests and lint, builds with-PreleaseVersion=X.Y.Z(versionName from the tag, versionCode derived asmajor*10000 + minor*100 + patch), verifies the signature withapksigner, publishes the APK to a GitHub Release with the preinstalledghCLI, and deletes the keystore in analways()step. Verified locally: the signed APK's certificate digest matches the keystore.