Skip to content

feat: Refactored customizer script for improved KMP project customization#32

Merged
niyajali merged 1 commit intoopenMF:devfrom
niyajali:update-script
Jan 21, 2025
Merged

feat: Refactored customizer script for improved KMP project customization#32
niyajali merged 1 commit intoopenMF:devfrom
niyajali:update-script

Conversation

@niyajali
Copy link
Collaborator

This pull request includes various changes to improve the Kotlin Multiplatform Project. The updates include a new ComposeApp component, enhancements to the customizer.sh script, renaming modules and files, and updating project configurations.

New Component and Refactoring:

  • Added a new ComposeApp component in cmp-navigation/src/commonMain/kotlin/cmp/navigation/ComposeApp.kt. This component integrates network and timezone monitors and sets up the navigation graph with a theme.
  • Refactored SharedApp to use the new ComposeApp component, simplifying the code and removing redundant imports.

Project Configuration Updates:

  • Updated the module name in .run/cmp-android.run.xml to kmp-project-template.cmp-android for better alignment with the project structure.
  • Changed the window title in cmp-desktop/src/jvmMain/kotlin/main.kt from "MifosAppTemplate" to "DesktopApp" to reflect the new application name.
  • Removed the api(projects.core.data) dependency from cmp-shared/build.gradle.kts to streamline dependencies.

Enhancements to customizer.sh Script:

  • Added color formatting and emoji indicators for better readability and user feedback.
  • Updated various functions in customizer.sh to 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.

…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.
```
@niyajali niyajali merged commit ee85628 into openMF:dev Jan 21, 2025
@niyajali niyajali deleted the update-script branch January 21, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant