Commit dc652e9
committed
refactor: Modularize project and introduce convention plugins
This commit refactors the project into a multi-module architecture, separating concerns into `core` and `feature` modules. This modularization improves scalability, maintainability, and build times by clearly defining dependencies and responsibilities. Gradle convention plugins have been introduced to standardize module configurations and streamline the build process.
### Core Changes:
- **feat(project)!**: Migrated from a monolithic `composeApp` to a multi-module architecture. Source code has been moved into new `core` and `feature` modules (e.g., `core/data`, `feature/settings/presentation`).
- **feat(build)**: Introduced Gradle convention plugins (`kmp.library`, `kmp.feature`, `kmp.ui`, `kmp.ui.feature`) to standardize module configurations for Kotlin Multiplatform.
- **feat(di)**: Centralized and modularized Koin dependency injection. Each feature now has its own DI module, improving separation of concerns.
- **refactor(core)**: Moved shared components, models, and utilities from `composeApp` into the `core` module, splitting them into `core:data`, `core:domain`, and `core:presentation` layers.
- **refactor(navigation)**: Migrated from a custom navigation implementation to `androidx.navigation:navigation-compose` for more robust and standardized navigation handling.
- **feat(i18n)**: Organized string resources into per-feature directories for better localization management, adding translations for Chinese, Turkish, and Russian.
### Detailed Changes:
- **refactor(data)!**: Relocated all data-layer components (DAOs, DTOs, repositories, services) from `composeApp` to their respective `core` or `feature` data modules.
- **refactor(domain)!**: Moved domain models and use cases to the `core:domain` and feature-specific domain modules.
- **refactor(ui)!**: Migrated presentation-layer components (Composables, ViewModels, UI state) to `core:presentation` or feature-specific presentation modules. This includes themes, components like `RepositoryCard`, and utilities.
- **refactor(services)**: Relocated platform-specific implementations like `Downloader`, `Installer`, and `BrowserHelper` to the `core:data` module.
- **feat(build)**: Enabled `-Xexpect-actual-classes` and `-Xmulti-dollar-interpolation` compiler arguments.
- **deps**: Upgraded `navigation-compose` to `2.9.1`.1 parent d04cd1f commit dc652e9
315 files changed
Lines changed: 35486 additions & 3582 deletions
File tree
- build-logic/convention/src/main/kotlin/zed/rainxch/githubstore/convention
- composeApp
- src
- androidMain/kotlin/zed/rainxch/githubstore
- app/di
- core/domain
- feature/details/presentation/utils
- commonMain/kotlin/zed/rainxch/githubstore
- app
- di
- state/components
- core/presentation
- components
- model
- theme
- utils
- jvmMain/kotlin/zed/rainxch/githubstore
- app/di
- core
- data/services
- domain
- feature
- details/presentation/utils
- settings/presentation/utils
- core
- data
- src
- androidMain/kotlin/zed/rainxch/core/data
- di
- local
- data_store
- db
- migrations
- services
- utils
- commonMain/kotlin/zed/rainxch/core/data
- di
- dto
- local/db
- dao
- entities
- mappers
- repository
- jvmMain/kotlin/zed/rainxch/core/data
- di
- local
- data_store
- db
- model
- services
- domain/src/commonMain/kotlin/zed/rainxch/core/domain
- model
- system
- use_cases
- utils
- presentation
- src
- androidMain/kotlin/zed/rainxch/core/presentation
- theme
- utils
- commonMain
- composeResources
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/core/presentation
- components
- theme
- utils
- jvmMain/kotlin/zed/rainxch/core/presentation
- theme
- utils
- feature
- apps
- data
- src/commonMain/kotlin/zed/rainxch/apps/data
- di
- repository
- domain/src/commonMain/kotlin/zed/rainxch/apps/domain/repository
- presentation/src/commonMain
- composeResources
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/apps/presentation
- auth
- data
- src/commonMain/kotlin/zed/rainxch/auth/data
- di
- repository
- presentation/src/commonMain
- composeResources
- drawable
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/auth/presentation
- model
- details
- data
- src/commonMain/kotlin/zed/rainxch/details/data
- di
- repository
- utils
- presentation
- src
- androidMain/kotlin/zed/rainxch/details/presentation/utils
- commonMain
- composeResources
- drawable
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/details/presentation
- components
- sections
- states
- model
- utils
- jvmMain/kotlin/zed/rainxch/details/presentation/utils
- dev-profile
- data
- src/commonMain/kotlin/zed/rainxch/devprofile/data
- di
- repository
- presentation/src
- androidMain/kotlin/zed/rainxch/devprofile/presentation
- commonMain
- composeResources
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/devprofile/presentation
- components
- favourites/presentation/src
- androidMain/kotlin/zed/rainxch/favourites/presentation
- commonMain
- composeResources
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/favourites/presentation
- components
- home
- data
- src/commonMain/kotlin/zed/rainxch/home/data
- data_source
- di
- dto
- mappers
- repository
- domain/src/commonMain/kotlin/zed/rainxch/home/domain/repository
- presentation/src/commonMain
- composeResources
- drawable
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/home/presentation
- model
- search
- data
- src/commonMain/kotlin/zed/rainxch/search/data
- di
- dto
- repository
- utils
- presentation/src/commonMain
- composeResources
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/search/presentation
- components
- utils
- settings
- data
- src/commonMain/kotlin/zed/rainxch/settings/data
- di
- repository
- domain/src/commonMain/kotlin/zed/rainxch/settings/domain/repository
- presentation/src/commonMain
- composeResources
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/settings/presentation
- components
- sections
- utils
- starred/presentation/src/commonMain
- composeResources
- values-bn
- values-es
- values-fr
- values-it
- values-ja
- values-kr
- values-pl
- values-ru
- values-tr
- values-zh-rCN
- values
- kotlin/zed/rainxch/starred/presentation
- components
- utils
- gradle
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | 59 | | |
61 | 60 | | |
| 61 | + | |
| 62 | + | |
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
65 | | - | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
| 13 | + | |
18 | 14 | | |
19 | 15 | | |
20 | 16 | | |
21 | 17 | | |
22 | 18 | | |
23 | 19 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 20 | + | |
29 | 21 | | |
30 | 22 | | |
31 | 23 | | |
| |||
Lines changed: 0 additions & 71 deletions
This file was deleted.
Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 8 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 4 | | |
8 | 5 | | |
9 | | - | |
10 | 6 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 7 | | |
16 | | - | |
| 8 | + | |
17 | 9 | | |
18 | 10 | | |
19 | | - | |
| 11 | + | |
| 12 | + | |
20 | 13 | | |
21 | 14 | | |
22 | | - | |
23 | | - | |
| 15 | + | |
24 | 16 | | |
25 | 17 | | |
26 | 18 | | |
27 | 19 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 20 | + | |
31 | 21 | | |
32 | 22 | | |
33 | 23 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 24 | + | |
39 | 25 | | |
40 | 26 | | |
41 | 27 | | |
| |||
45 | 31 | | |
46 | 32 | | |
47 | 33 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | 34 | | |
67 | 35 | | |
68 | 36 | | |
| |||
73 | 41 | | |
74 | 42 | | |
75 | 43 | | |
76 | | - | |
77 | | - | |
| 44 | + | |
78 | 45 | | |
79 | 46 | | |
80 | 47 | | |
81 | 48 | | |
82 | 49 | | |
83 | | - | |
| 50 | + | |
84 | 51 | | |
85 | 52 | | |
86 | 53 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | | - | |
5 | | - | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 9 additions & 58 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 8 | | |
12 | 9 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | 10 | | |
17 | 11 | | |
18 | 12 | | |
19 | 13 | | |
20 | | - | |
| 14 | + | |
21 | 15 | | |
22 | 16 | | |
23 | 17 | | |
24 | | - | |
25 | | - | |
26 | 18 | | |
27 | 19 | | |
28 | 20 | | |
29 | | - | |
30 | | - | |
| 21 | + | |
31 | 22 | | |
32 | 23 | | |
33 | 24 | | |
| |||
39 | 30 | | |
40 | 31 | | |
41 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
42 | 37 | | |
43 | 38 | | |
44 | 39 | | |
| |||
92 | 87 | | |
93 | 88 | | |
94 | 89 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 90 | + | |
| 91 | + | |
139 | 92 | | |
140 | | - | |
141 | | - | |
142 | 93 | | |
143 | 94 | | |
144 | 95 | | |
145 | 96 | | |
146 | 97 | | |
147 | 98 | | |
148 | | - | |
| 99 | + | |
149 | 100 | | |
150 | 101 | | |
151 | 102 | | |
| |||
0 commit comments