feat: Refactored customizer script for improved KMP project customization#32
Merged
niyajali merged 1 commit intoopenMF:devfrom Jan 21, 2025
Merged
feat: Refactored customizer script for improved KMP project customization#32niyajali merged 1 commit intoopenMF:devfrom
niyajali merged 1 commit intoopenMF:devfrom
Conversation
…tion
This commit refactors the `customizer.sh` script, enhancing its functionality for customizing Kotlin Multiplatform (KMP) projects. Key improvements include:
- **Enhanced UI and Feedback:** Added colors, emojis, and formatting for a better user experience, making the script more visually appealing and informative.
- **Modular Processing:** Refactored the script into modular functions, improving organization and maintainability.
- **Improved Logic:** Streamlined the script's logic for more accurate and reliable project customization.
- **New Features:**
- Added functions to update package namespace and root project name.
- Implemented `print_success`, `print_warning`, `print_info`, and `print_processing` to provide clear feedback.
- Introduced a `print_welcome_banner` for a more engaging start.
- **Robust Error Handling:** Improved error handling and backup/restore mechanisms, enhancing the script's robustness.
- **Module and File Renaming:** Added a function to rename files more accurately.
- **Final Summary:** Improved the final summary, providing clearer information on changes made.
- Refactor `sync-cmp-dir.sh`, `sync-cmp-dirs.sh` and `sync-dir.sh` scripts for improved KMP project syncs.
- Added `ComposeApp` navigation component.
- Removed old code and improved documentation.
- Updated `cmp-shared/build.gradle.kts` dependencies.
- Removed `cmp-shared/src/commonMain/kotlin/cmp/shared/SharedApp.kt` content and update navigation.
- Removed `cmp-desktop/src/jvmMain/kotlin/main.kt` content and updated app title.
- Updated `.run/cmp-android.run.xml` module name.
- **Backup Management:** Added improved file backup and restore functionality, increasing data safety.
```
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.
This pull request includes various changes to improve the Kotlin Multiplatform Project. The updates include a new
ComposeAppcomponent, enhancements to thecustomizer.shscript, renaming modules and files, and updating project configurations.New Component and Refactoring:
ComposeAppcomponent incmp-navigation/src/commonMain/kotlin/cmp/navigation/ComposeApp.kt. This component integrates network and timezone monitors and sets up the navigation graph with a theme.SharedAppto use the newComposeAppcomponent, simplifying the code and removing redundant imports.Project Configuration Updates:
.run/cmp-android.run.xmltokmp-project-template.cmp-androidfor better alignment with the project structure.cmp-desktop/src/jvmMain/kotlin/main.ktfrom "MifosAppTemplate" to "DesktopApp" to reflect the new application name.api(projects.core.data)dependency fromcmp-shared/build.gradle.ktsto streamline dependencies.Enhancements to
customizer.shScript:customizer.shto improve package namespace updates, root project name updates, and module processing. [1] [2] [3]These changes collectively improve the maintainability, readability, and user experience of the project.