desktop/8.4.8
·
7 commits
to master
since this release
feat: Enable SQLCipher encryption for Desktop JVM
This commit introduces database encryption support for the Desktop JVM target using SQLCipher, achieving feature parity with the Android and iOS versions. This was accomplished by replacing the standard `sqlite-jdbc` driver with `sqlite-jdbc-crypt`, a fork that bundles SQLCipher.
Key changes include:
- **feat(db-sqldelight):**
- Added `sqlite-jdbc-crypt` as the JDBC driver for the `jvmMain` source set.
- Updated `JdbcDatabaseHolder` to construct an encrypted JDBC URL with SQLCipher parameters (`cipher=sqlcipher`, `legacy=4`, and `key`) when a password is provided.
- Implemented `JvmCipherUtils` to handle the encryption and decryption of the database file by leveraging SQLCipher's `ATTACH` and `sqlcipher_export` functionalities.
- Added `JvmCipherUtilsEncryptionTest` to provide robust testing for the encryption/decryption logic.
- **test(desktop):**
- Enabled previously ignored encryption-related UI tests for the desktop module (`flowAfterCryptTest`, `settingPasswordTest`).
- Improved the reliability of UI tests by adding descriptive logging, explicit waits, and ensuring `requireNotNull` checks in the navigation router for better error reporting.
- **refactor(ui-test):**
- Enhanced UI test helpers (`waitUntilDisplayed`, `waitAssert`, etc.) with descriptions for better debugging and logging.
- Added logging to UI test cases (`SettingPasswordTestCase`, `FlowAfterCryptTestCase`) to trace test execution flow.
- **chore(deps):**
- Bumped various dependencies, including AGP, Firebase, Compose, and SQLCipher.
- Updated package versions for Android, iOS, and Desktop to `8.4.8`.
- **docs:**
- Updated `README.md` and `ARCHITECTURE.md` files to reflect that encryption is now supported on the Desktop JVM platform.
- **fix(android):**
- Configured the Crashlytics log writer to capture logs from `Debug` severity and higher in release builds to improve remote diagnostics.