Commit d269fc8
committed
feat: Implement database backup (import/export) and refactor module structure
This commit introduces a new backup feature for database import and export across all supported platforms, reorganizes core modules into feature-based structures, and updates dependencies to use official KMP artifacts.
- **New Feature: Database Backup**:
- Created `feature:backup:domain` and `feature:backup:ui` modules to handle database import/export logic and UI.
- Implemented platform-specific `DatabaseFilePicker` and `DatabaseFileTransfer` using Okio for file operations (WASM excluded).
- Added `ExportDatabaseUseCase` and `ImportDatabaseUseCase` to manage database states and file copying.
- Added new settings category for "Backup" with export/import actions in `SettingsDetailScreen`.
- Integrated backup functionality into `SettingsViewModel` and added relevant localized strings.
- **Refactor & Module Reorganization**:
- Renamed and moved `core:data:file-explorer` to `feature:file-explorer:data`.
- Removed vendored `thirdparty:androidx:paging:compose` in favor of the official `androidx.paging:paging-compose` (version 3.4.0) now supporting KMP.
- Reorganized `sharedModules.kt` and `uiTestModules.kt` to include new backup use cases and test mocks.
- **Test Infrastructure**:
- Added `BackupFeatureTestCase` for integration testing of the import/export flow.
- Implemented `createTempBackupPath` expect/actual utility for cross-platform test file management.
- Updated `AndroidUiTests` and `DesktopUiTests` to include the new backup feature test.
- Added `TestDatabaseFilePicker` for headless UI testing of file selection.
- **Build & Dependency Updates**:
- Updated various dependencies: `androidSqlCipher` (4.13.0), `kotlinx-serialization` (1.10.0), and `androidx-paging` (3.4.0).
- Switched internal library references from direct `compose` properties to `libs.compose` version catalog entries for better consistency.
- Added `disableIosReleaseTasks` utility to convention plugins to optimize CI test builds.
- **Bug Fixes**:
- Updated `OffsetQueryPagingSource` in SQLDelight paging implementation to fix `getRefreshKey` calculation.
- Fixed `ChangePasswordUseCase` logic to handle null/empty password scenarios correctly.1 parent 7172961 commit d269fc8
File tree
70 files changed
+1083
-141
lines changed- app
- android
- src/androidTest/java/com/softartdev/notedelight/ui
- desktop
- src/jvmTest/kotlin/com/softartdev/notedelight/ui
- ios-kit
- iosApp/iosApp.xcworkspace/xcuserdata/artur.xcuserdatad
- web
- build-logic/convention/src/main/kotlin/com/softartdev/notedelight
- core
- domain
- src/commonMain/kotlin/com/softartdev/notedelight
- model
- usecase/crypt
- presentation
- src
- androidHostTest/kotlin/com/softartdev/notedelight/presentation
- adaptive
- settings
- commonMain/kotlin/com/softartdev/notedelight/presentation/settings
- feature
- backup
- domain
- src
- commonMain/kotlin/com/softartdev/notedelight
- repository
- usecase/settings
- nonWasmMain/kotlin/com/softartdev/notedelight/repository
- wasmJsMain/kotlin/com/softartdev/notedelight/repository
- ui
- src
- androidMain/kotlin/com/softartdev/notedelight/ui/settings/detail
- commonMain/kotlin/com/softartdev/notedelight/ui/settings/detail
- iosMain/kotlin/com/softartdev/notedelight/ui/settings/detail
- jvmMain/kotlin/com/softartdev/notedelight/ui/settings/detail
- wasmJsMain/kotlin/com/softartdev/notedelight/ui/settings/detail
- file-explorer/data
- src
- androidMain/kotlin/com/softartdev/notedelight/repository
- commonMain/kotlin/com/softartdev/notedelight/repository
- commonTest/kotlin/com/softartdev/notedelight/repository
- iosMain/kotlin/com/softartdev/notedelight/repository
- jvmMain/kotlin/com/softartdev/notedelight/repository
- wasmJsMain/kotlin/com/softartdev/notedelight/repository
- gradle
- thirdparty
- androidx/paging/compose
- app/cash/sqldelight/paging3/src/commonMain/kotlin/app/cash/sqldelight/paging3
- ui
- test-jvm
- test
- src
- androidMain/kotlin/com/softartdev/notedelight
- commonMain/kotlin/com/softartdev/notedelight
- di
- ui
- cases
- screen
- settings/detail
- iosMain/kotlin/com/softartdev/notedelight
- jvmMain/kotlin/com/softartdev/notedelight
- wasmJsMain/kotlin/com/softartdev/notedelight
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
70 files changed
+1083
-141
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
108 | 110 | | |
109 | 111 | | |
110 | 112 | | |
111 | | - | |
| 113 | + | |
112 | 114 | | |
113 | 115 | | |
114 | 116 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
57 | 60 | | |
58 | 61 | | |
59 | 62 | | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | | - | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | 1 | | |
4 | | - | |
5 | 2 | | |
6 | 3 | | |
7 | 4 | | |
| |||
35 | 32 | | |
36 | 33 | | |
37 | 34 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
42 | 39 | | |
43 | 40 | | |
| 41 | + | |
44 | 42 | | |
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | | - | |
49 | | - | |
| 46 | + | |
| 47 | + | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
| |||
Binary file not shown.
0 commit comments