Commit 6093dfb
committed
feat: Add Clean Build feature to find and delete build folders
This commit introduces a new "Clean Build" feature, allowing users to scan for and delete `build` directories within their projects to free up disk space.
The feature includes a dedicated screen with the following functionalities:
* Browsing for a root project directory (e.g., `AndroidStudioProjects`).
* Scanning the selected directory to identify Gradle projects and their `build` folders.
* Displaying a detailed, hierarchical view of projects and their modules, along with the size of each `build` folder.
* Functionality to select/deselect all, expand/collapse all, and individually select projects or modules for deletion.
* A floating action button to initiate the deletion process, showing the number of selected folders and the total space that will be freed.
* Confirmation and result dialogs to ensure a safe and clear user experience.
### Key Changes:
* **`composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer/presentation/screen/cleanbuild`**: Added a new screen package containing the UI (`CleanBuildScreen.kt`), ViewModel (`CleanBuildViewModel.kt`), UI state (`CleanBuildUiState.kt`), and user intents (`CleanBuildIntent.kt`).
* **`composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer/data`**:
* Created `CleanBuildRepository` and its implementation to handle the logic for scanning projects and deleting folders.
* Defined new data models `ProjectBuildInfo` and `ModuleBuild` for the feature.
* **`composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer/di`**: Updated `RepositoryModule.kt` and `ViewModule.kt` to provide dependencies for the new feature.
* **`composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer/presentation/navigation`**:
* Integrated the "Clean Build" screen into the app's navigation graph (`AppNavigation.kt`, `AppRoute.kt`).
* Added a new "Clean Build" item to the main navigation rail (`NavigationItem.kt`).
* **`composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer/core/utility/Utils.kt`**: Added a `formatElapsedTime` utility function.1 parent 734ea5b commit 6093dfb
File tree
1 file changed
+16
-12
lines changed- composeApp/src/jvmMain/kotlin/com/meet/dev/analyzer/presentation/screen/cleanbuild/components
1 file changed
+16
-12
lines changedLines changed: 16 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
74 | | - | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
86 | | - | |
| 90 | + | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| |||
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | | - | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
110 | | - | |
| 114 | + | |
111 | 115 | | |
112 | 116 | | |
113 | 117 | | |
| |||
120 | 124 | | |
121 | 125 | | |
122 | 126 | | |
123 | | - | |
| 127 | + | |
124 | 128 | | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | 138 | | |
135 | 139 | | |
136 | | - | |
| 140 | + | |
137 | 141 | | |
138 | 142 | | |
139 | 143 | | |
| |||
0 commit comments