From 3a682a1151861971b9e9c80e5f291a49f0dc39fa Mon Sep 17 00:00:00 2001 From: Biplab Dutta Date: Tue, 30 Dec 2025 21:41:23 +0530 Subject: [PATCH 1/6] refactor(workflows): add upstream address --- .github/workflows/sync-dirs.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync-dirs.yaml b/.github/workflows/sync-dirs.yaml index 996e95e55d..86e8c303fe 100644 --- a/.github/workflows/sync-dirs.yaml +++ b/.github/workflows/sync-dirs.yaml @@ -31,7 +31,8 @@ jobs: - name: Add upstream remote and fetch run: | - git remote add upstream ${{ inputs.upstream }} || true + UPSTREAM="${{ inputs.upstream || 'https://github.com/openMF/kmp-project-template.git' }}" + git remote add upstream "$UPSTREAM" || true git fetch upstream || exit 1 - name: Check upstream/dev exists From 5d301c39504cba48a9eda932c3a2da86ed933c96 Mon Sep 17 00:00:00 2001 From: Biplab Dutta Date: Tue, 30 Dec 2025 21:51:17 +0530 Subject: [PATCH 2/6] refactor(workflows): replace PAT with GITHUB --- .github/workflows/sync-dirs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-dirs.yaml b/.github/workflows/sync-dirs.yaml index 86e8c303fe..c56be49037 100644 --- a/.github/workflows/sync-dirs.yaml +++ b/.github/workflows/sync-dirs.yaml @@ -233,7 +233,7 @@ jobs: if: steps.check_changes.outputs.has_changes == 'true' uses: peter-evans/create-pull-request@v7 with: - token: ${{ secrets.PAT_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} commit-message: "chore: Sync directories and files from upstream" title: "chore: Sync directories and files from upstream" body: | From 6dd3d731faabcd41931d7499c49a2242f19346c5 Mon Sep 17 00:00:00 2001 From: Biplab Dutta Date: Wed, 31 Dec 2025 18:05:02 +0530 Subject: [PATCH 3/6] refactor(workflows): replace GITHUB_TOKEN with PAT_TOKEN --- .github/workflows/sync-dirs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-dirs.yaml b/.github/workflows/sync-dirs.yaml index c56be49037..86e8c303fe 100644 --- a/.github/workflows/sync-dirs.yaml +++ b/.github/workflows/sync-dirs.yaml @@ -233,7 +233,7 @@ jobs: if: steps.check_changes.outputs.has_changes == 'true' uses: peter-evans/create-pull-request@v7 with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.PAT_TOKEN }} commit-message: "chore: Sync directories and files from upstream" title: "chore: Sync directories and files from upstream" body: | From 8144a4eb691af3c7cc5640298d4286b072741cd2 Mon Sep 17 00:00:00 2001 From: Biplab Dutta Date: Wed, 31 Dec 2025 18:10:17 +0530 Subject: [PATCH 4/6] refactor(workflows): skip sync dir run on template --- .github/workflows/sync-dirs.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sync-dirs.yaml b/.github/workflows/sync-dirs.yaml index 86e8c303fe..6a947f649a 100644 --- a/.github/workflows/sync-dirs.yaml +++ b/.github/workflows/sync-dirs.yaml @@ -12,6 +12,7 @@ on: jobs: sync-directories: + if: github.repository != 'openMF/kmp-project-template' runs-on: ubuntu-latest permissions: contents: write From 75d86709b1d5abb911a14baa692f80f6b4c29c11 Mon Sep 17 00:00:00 2001 From: Biplab Dutta Date: Wed, 31 Dec 2025 18:25:18 +0530 Subject: [PATCH 5/6] refactor(workflows): changed cron pattern to test scheduled run --- .github/workflows/sync-dirs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-dirs.yaml b/.github/workflows/sync-dirs.yaml index 6a947f649a..a2d5ab9cdc 100644 --- a/.github/workflows/sync-dirs.yaml +++ b/.github/workflows/sync-dirs.yaml @@ -8,7 +8,7 @@ on: required: true type: string schedule: - - cron: '0 0 * * 1' + - cron: '*/10 * * * *' jobs: sync-directories: From 99ec3dfc125033a2cabec33531151aef1be6bcde Mon Sep 17 00:00:00 2001 From: biplab1 <9689491+biplab1@users.noreply.github.com> Date: Wed, 31 Dec 2025 13:49:00 +0000 Subject: [PATCH 6/6] chore: Sync directories and files from upstream --- .github/workflows/build-and-deploy-site.yml | 65 ++ .github/workflows/cache-cleanup.yaml | 15 + .github/workflows/monthly-version-tag.yml | 66 ++ .../multi-platform-build-and-publish.yml | 45 +- .github/workflows/pr-check.yml | 32 +- .github/workflows/promote-to-production.yml | 4 +- .github/workflows/sync-dirs.yaml | 16 +- .github/workflows/tag-weekly-release.yml | 88 ++- .run/cmp-android.run.xml | 74 +++ .run/cmp-desktop.run.xml | 5 - .run/cmp-web-js.run.xml | 2 +- Gemfile | 10 +- Gemfile.lock | 148 ++--- build-logic/README.md | 10 +- build-logic/convention/build.gradle.kts | 125 ++-- ...droidApplicationComposeConventionPlugin.kt | 5 +- .../AndroidApplicationConventionPlugin.kt | 29 +- ...roidApplicationFirebaseConventionPlugin.kt | 20 +- ...droidApplicationFlavorsConventionPlugin.kt | 5 +- .../kotlin/AndroidLintConventionPlugin.kt | 17 +- .../main/kotlin/CMPFeatureConventionPlugin.kt | 47 +- .../src/main/kotlin/DetektConventionPlugin.kt | 26 + .../main/kotlin/FieldSkippingClassVisitor.kt | 4 +- .../main/kotlin/GitHooksConventionPlugin.kt | 57 ++ .../main/kotlin/KMPKoinConventionPlugin.kt | 22 +- .../main/kotlin/KMPLibraryConventionPlugin.kt | 30 +- .../main/kotlin/KMPRoomConventionPlugin.kt | 9 +- .../KeystoreManagementConventionPlugin.kt | 153 +++++ .../src/main/kotlin/KtlintConventionPlugin.kt | 19 + .../main/kotlin/SpotlessConventionPlugin.kt | 25 + .../kotlin/org/convention/AndroidCompose.kt | 63 ++ .../convention/AndroidInstrumentedTests.kt | 19 + .../kotlin/org/convention/AppBuildType.kt | 9 + .../main/kotlin/org/convention/AppFlavor.kt | 48 ++ .../src/main/kotlin/org/convention/Badging.kt | 156 +++++ .../src/main/kotlin/org/convention/Detekt.kt | 43 ++ .../org/convention/GradleManagedDevices.kt | 70 ++ .../org/convention/HierarchyTemplate.kt | 179 ++++++ .../src/main/kotlin/org/convention/Jacoco.kt | 134 ++++ .../kotlin/org/convention/KotlinAndroid.kt | 77 +++ .../org/convention/KotlinMultiplatform.kt | 40 ++ .../kotlin/org/convention/PrintTestApks.kt | 95 +++ .../org/convention/ProjectExtensions.kt | 39 ++ .../main/kotlin/org/convention/Spotless.kt | 36 ++ .../convention/keystore/BaseKeystoreTask.kt | 97 +++ .../keystore/ConfigurationFileUpdatesTask.kt | 347 ++++++++++ .../keystore/ConfigurationValidator.kt | 332 ++++++++++ .../keystore/EnvironmentOverrideHandler.kt | 306 +++++++++ .../org/convention/keystore/KeystoreConfig.kt | 76 +++ .../keystore/KeystoreGenerationTask.kt | 353 +++++++++++ .../org/convention/keystore/KeystoreLogger.kt | 46 ++ .../org/convention/keystore/SecretsConfig.kt | 65 ++ .../convention/keystore/SecretsEnvParser.kt | 243 +++++++ .../keystore/SecretsEnvUpdateTask.kt | 598 ++++++++++++++++++ .../ConfigurationFileUpdatesTaskTest.kt | 364 +++++++++++ .../keystore/KeystoreGenerationTaskTest.kt | 306 +++++++++ .../keystore/SecretsEnvParserTest.kt | 389 ++++++++++++ .../keystore/SecretsEnvUpdateTaskTest.kt | 450 +++++++++++++ build-logic/settings.gradle.kts | 16 - ci-prepush.bat | 4 +- ci-prepush.sh | 2 + cmp-android/build.gradle.kts | 105 +-- cmp-android/lint-baseline.xml | 2 +- cmp-android/prodRelease-badging.txt | 196 +++--- cmp-android/proguard-rules.pro | 4 +- cmp-android/src/main/AndroidManifest.xml | 52 +- .../main/kotlin/cmp/android/app/AndroidApp.kt | 28 +- .../cmp/android/app/AppThemeExtensions.kt | 21 + .../cmp/android/app/BuildConfigUtils.kt | 65 ++ .../app/ComponentActivityExtensions.kt | 51 +- .../cmp/android/app/ConfigurationExtension.kt | 15 + .../kotlin/cmp/android/app/MainActivity.kt | 120 ++-- cmp-android/src/prod/AndroidManifest.xml | 33 + cmp-desktop/build.gradle.kts | 93 +-- cmp-desktop/src/jvmMain/kotlin/main.kt | 9 +- cmp-ios/Configuration/Config.xcconfig | 4 +- cmp-ios/Podfile | 24 +- cmp-ios/iosApp.xcodeproj/project.pbxproj | 83 ++- .../UserInterfaceState.xcuserstate | Bin 24141 -> 34158 bytes .../xcschemes/xcschememanagement.plist | 2 +- .../xcschemes/iosApp.xcscheme | 32 + .../xcschemes/xcschememanagement.plist | 14 + .../xcschemes/xcschememanagement.plist | 5 + cmp-ios/iosApp/ContentView.swift | 3 +- cmp-ios/iosApp/Info.plist | 12 +- cmp-shared/build.gradle.kts | 29 +- cmp-shared/cmp_shared.podspec | 2 +- .../commonMain/kotlin/cmp/shared/SharedApp.kt | 29 +- .../kotlin/cmp/shared/utils/KoinExt.kt | 2 +- .../kotlin/org/mifos/shared/ViewController.kt | 4 +- cmp-web/build.gradle.kts | 9 +- cmp-web/src/jsMain/kotlin/Application.kt | 4 +- cmp-web/src/wasmJsMain/kotlin/Main.kt | 6 +- config/detekt/detekt.yml | 13 +- core-base/analytics/build.gradle.kts | 2 +- .../core/base/analytics/di/AnalyticsModule.kt | 2 +- .../src/androidMain/AndroidManifest.xml | 2 +- .../di/AnalyticsModule.kt | 2 +- .../core/base/analytics/AnalyticsEvent.kt | 27 +- .../base/analytics/AnalyticsExtensions.kt | 4 +- .../core/base/analytics/AnalyticsHelper.kt | 2 +- .../base/analytics/NoOpAnalyticsHelper.kt | 2 +- .../core/base/analytics/PerformanceTracker.kt | 4 +- .../base/analytics/StubAnalyticsHelper.kt | 2 +- .../core/base/analytics/TestingUtils.kt | 2 +- .../template/core/base/analytics/UiHelpers.kt | 2 +- .../core/base/analytics/ValidationUtils.kt | 2 +- .../core/base/analytics/di/AnalyticsModule.kt | 2 +- .../analytics/di/AnalyticsModule.desktop.kt | 2 +- .../di/AnalyticsModule.js.kt | 2 +- .../AnalyticsModule.native.kt | 2 +- .../base/analytics/FirebaseAnalyticsHelper.kt | 2 +- .../analytics/di/AnalyticsModule.wasmJs.kt | 2 +- core-base/common/build.gradle.kts | 2 +- .../src/androidMain/AndroidManifest.xml | 2 +- .../core/base/common/Parcelize.android.kt | 2 +- .../base/common/di/CommonModule.android.kt | 2 +- .../common/manager/DispatchManagerImpl.kt | 2 +- .../template/core/base/common/DataState.kt | 2 +- .../core/base/common/DataStateExtensions.kt | 2 +- .../core/base/common/ImageExtension.kt | 2 +- .../template/core/base/common/Parcelize.kt | 2 +- .../core/base/common/di/CommonModule.kt | 2 +- .../base/common/manager/DispatcherManager.kt | 2 +- .../core/base/common/Parcelize.nonAndroid.kt | 2 +- .../base/common/di/CommonModule.nonAndroid.kt | 2 +- .../common/manager/DispatchManagerImpl.kt | 2 +- core-base/database/build.gradle.kts | 2 +- .../core/base/database/AppDatabaseFactory.kt | 2 +- .../template/core/base/database/Room.kt | 2 +- .../core/base/database/TypeConverter.kt | 2 +- .../core/base/database/AppDatabaseFactory.kt | 2 +- .../core/base/database/AppDatabaseFactory.kt | 2 +- .../core/base/database/Room.nonJsCommon.kt | 2 +- .../database/TypeConverter.nonJsCommon.kt | 2 +- core-base/designsystem/build.gradle.kts | 2 +- .../base/designsystem/KptMaterialTheme.kt | 2 +- .../core/base/designsystem/KptTheme.kt | 2 +- .../base/designsystem/KptThemeExtensions.kt | 2 +- .../designsystem/component/BounceAnimation.kt | 2 +- .../component/KptAnimationSpecs.kt | 2 +- .../component/KptShimmerLoadingBox.kt | 2 +- .../designsystem/component/KptSnackbarHost.kt | 2 +- .../designsystem/component/KptTopAppBar.kt | 2 +- .../designsystem/component/SlideTransition.kt | 2 +- .../designsystem/core/ComponentStateHolder.kt | 2 +- .../base/designsystem/core/KptComponent.kt | 2 +- .../core/KptTopAppBarConfiguration.kt | 2 +- .../layout/AdaptiveListDetailPaneScaffold.kt | 2 +- .../AdaptiveNavigableListDetailScaffold.kt | 2 +- ...AdaptiveNavigableSupportingPaneScaffold.kt | 2 +- .../layout/AdaptiveNavigationSuiteScaffold.kt | 2 +- .../base/designsystem/layout/KptFlowColumn.kt | 2 +- .../base/designsystem/layout/KptFlowRow.kt | 2 +- .../core/base/designsystem/layout/KptGrid.kt | 2 +- .../designsystem/layout/KptMasonryGrid.kt | 2 +- .../layout/KptResponsiveLayout.kt | 2 +- .../designsystem/layout/KptSidebarLayout.kt | 2 +- .../base/designsystem/layout/KptSplitPane.kt | 2 +- .../core/base/designsystem/layout/KptStack.kt | 2 +- .../designsystem/theme/KptColorSchemeImpl.kt | 2 +- core-base/network/build.gradle.kts | 4 +- .../base/network/KtorHttpClient.android.kt | 18 + .../core/base/network/KtorHttpClient.kt | 162 +++++ .../core/base/network/NetworkError.kt | 58 ++ .../core/base/network/NetworkResult.kt | 39 ++ .../factory/ResultSuspendConverterFactory.kt | 118 ++++ .../base/network/KtorHttpClient.desktop.kt | 18 + .../core/base/network/KtorHttpClient.js.kt | 18 + .../base/network/KtorHttpClient.native.kt | 18 + .../base/network/KtorHttpClient.wasmJs.kt | 18 + core-base/platform/build.gradle.kts | 2 +- .../platform/LocalManagerProviders.android.kt | 2 +- .../platform/context/AppContext.android.kt | 2 +- .../GarbageCollectionManager.android.kt | 2 +- .../base/platform/intent/IntentManagerImpl.kt | 2 +- .../platform/review/AppReviewManagerImpl.kt | 2 +- .../platform/update/AppUpdateManagerImpl.kt | 2 +- .../base/platform/utils/AndroidBuildUtils.kt | 2 +- .../base/platform/LocalManagerProviders.kt | 2 +- .../core/base/platform/context/AppContext.kt | 2 +- .../core/base/platform/di/PlatformModule.kt | 2 +- .../garbage/GarbageCollectionManager.kt | 2 +- .../garbage/GarbageCollectionManagerImpl.kt | 2 +- .../base/platform/intent/IntentManager.kt | 2 +- .../core/base/platform/model/MimeType.kt | 2 +- .../base/platform/review/AppReviewManager.kt | 2 +- .../base/platform/update/AppUpdateManager.kt | 2 +- .../platform/LocalManagerProviders.native.kt | 2 +- .../platform/context/AppContext.native.kt | 2 +- .../GarbageCollectionManager.nonAndroid.kt | 2 +- .../base/platform/intent/IntentManagerImpl.kt | 2 +- .../platform/review/AppReviewManagerImpl.kt | 2 +- .../platform/update/AppUpdateManagerImpl.kt | 2 +- core-base/ui/README.md | 29 +- core-base/ui/build.gradle.kts | 2 +- .../core/base/ui/JankStatsExtensions.kt | 2 +- .../core/base/ui/ReportDrawnExt.android.kt | 2 +- .../core/base/ui/ShareUtils.android.kt | 71 ++- .../template/core/base/ui/BackgroundEvent.kt | 2 +- .../template/core/base/ui/BaseViewModel.kt | 2 +- .../template/core/base/ui/EventsEffect.kt | 2 +- .../template/core/base/ui/ImageLoaderExt.kt | 82 +-- .../core/base/ui/JankStatsExtension.kt | 2 +- .../core/base/ui/LifecycleEventEffect.kt | 2 +- .../core/base/ui/NavGraphBuilderExtensions.kt | 2 +- .../template/core/base/ui/ReportDrawnExt.kt | 2 +- .../template/core/base/ui/ShareUtils.kt | 48 +- .../template/core/base/ui/SharedElementExt.kt | 2 +- .../kotlin/template/core/base/ui/StringExt.kt | 2 +- .../template/core/base/ui/Transition.kt | 2 +- .../core/base/ui/ShareUtils.desktop.kt | 69 +- .../template/core/base/ui/ShareUtils.kt | 20 +- .../core/base/ui/ShareUtils.native.kt | 58 +- .../core/base/ui/JankStatsExtension.jvmJs.kt | 2 +- .../core/base/ui/ReportDrawnExt.jvmJs.kt | 2 +- fastlane/AppFile | 14 +- fastlane/FastFile | 451 +++++-------- fastlane/README.md | 32 +- scripts/pre-commit.sh | 7 +- scripts/pre-push.sh | 17 +- 221 files changed, 7576 insertions(+), 1278 deletions(-) create mode 100644 .github/workflows/build-and-deploy-site.yml create mode 100644 .github/workflows/cache-cleanup.yaml create mode 100644 .github/workflows/monthly-version-tag.yml create mode 100644 .run/cmp-android.run.xml create mode 100644 build-logic/convention/src/main/kotlin/DetektConventionPlugin.kt create mode 100644 build-logic/convention/src/main/kotlin/GitHooksConventionPlugin.kt create mode 100644 build-logic/convention/src/main/kotlin/KeystoreManagementConventionPlugin.kt create mode 100644 build-logic/convention/src/main/kotlin/KtlintConventionPlugin.kt create mode 100644 build-logic/convention/src/main/kotlin/SpotlessConventionPlugin.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/AndroidCompose.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/AndroidInstrumentedTests.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/AppBuildType.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/AppFlavor.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/Badging.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/Detekt.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/GradleManagedDevices.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/HierarchyTemplate.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/Jacoco.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/KotlinAndroid.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/KotlinMultiplatform.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/PrintTestApks.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/ProjectExtensions.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/Spotless.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/BaseKeystoreTask.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/ConfigurationFileUpdatesTask.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/ConfigurationValidator.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/EnvironmentOverrideHandler.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/KeystoreConfig.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/KeystoreGenerationTask.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/KeystoreLogger.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/SecretsConfig.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/SecretsEnvParser.kt create mode 100644 build-logic/convention/src/main/kotlin/org/convention/keystore/SecretsEnvUpdateTask.kt create mode 100644 build-logic/convention/src/test/kotlin/org/convention/keystore/ConfigurationFileUpdatesTaskTest.kt create mode 100644 build-logic/convention/src/test/kotlin/org/convention/keystore/KeystoreGenerationTaskTest.kt create mode 100644 build-logic/convention/src/test/kotlin/org/convention/keystore/SecretsEnvParserTest.kt create mode 100644 build-logic/convention/src/test/kotlin/org/convention/keystore/SecretsEnvUpdateTaskTest.kt mode change 100755 => 100644 ci-prepush.sh create mode 100644 cmp-android/src/main/kotlin/cmp/android/app/AppThemeExtensions.kt create mode 100644 cmp-android/src/main/kotlin/cmp/android/app/BuildConfigUtils.kt create mode 100644 cmp-android/src/main/kotlin/cmp/android/app/ConfigurationExtension.kt create mode 100644 cmp-android/src/prod/AndroidManifest.xml create mode 100644 cmp-ios/iosApp.xcodeproj/xcuserdata/skniyajali.xcuserdatad/xcschemes/iosApp.xcscheme create mode 100644 cmp-ios/iosApp.xcodeproj/xcuserdata/skniyajali.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 cmp-ios/iosApp.xcworkspace/xcuserdata/skniyajali.xcuserdatad/xcschemes/xcschememanagement.plist create mode 100644 core-base/network/src/androidMain/kotlin/template/core/base/network/KtorHttpClient.android.kt create mode 100644 core-base/network/src/commonMain/kotlin/template/core/base/network/KtorHttpClient.kt create mode 100644 core-base/network/src/commonMain/kotlin/template/core/base/network/NetworkError.kt create mode 100644 core-base/network/src/commonMain/kotlin/template/core/base/network/NetworkResult.kt create mode 100644 core-base/network/src/commonMain/kotlin/template/core/base/network/factory/ResultSuspendConverterFactory.kt create mode 100644 core-base/network/src/desktopMain/kotlin/template/core/base/network/KtorHttpClient.desktop.kt create mode 100644 core-base/network/src/jsMain/kotlin/template/core/base/network/KtorHttpClient.js.kt create mode 100644 core-base/network/src/nativeMain/kotlin/template/core/base/network/KtorHttpClient.native.kt create mode 100644 core-base/network/src/wasmJsMain/kotlin/template/core/base/network/KtorHttpClient.wasmJs.kt diff --git a/.github/workflows/build-and-deploy-site.yml b/.github/workflows/build-and-deploy-site.yml new file mode 100644 index 0000000000..280e58d834 --- /dev/null +++ b/.github/workflows/build-and-deploy-site.yml @@ -0,0 +1,65 @@ +# This workflow is designed to automate the process of building and deploying a Kotlin/JS web application to GitHub Pages. +# It ensures that whenever changes are merged into the dev branch or when manually triggered, the web application is built, +# packaged, and deployed to the GitHub Pages environment, making it accessible online. + +# Key Features: +# - Automated web application build using Kotlin/JS +# - Deployment to GitHub Pages +# - Supports configurable web project module name +# - Manages deployment concurrency and environment settings +# - Provides secure deployment with proper permissions + +# Prerequisites: +# - Kotlin Multiplatform/JS project configured with Gradle +# - Web module set up for browser distribution +# - Java 17 or compatible version +# - GitHub Pages enabled in repository settings + +# Workflow Configuration: +# - Requires input of `web_package_name` to specify the web project module +# - Uses Windows runner for build process +# - Leverages GitHub Actions for build, pages configuration, and deployment + +# Workflow Triggers: +# - Can be manually called from other workflows +# - Supports workflow_call for reusability across projects + +# Deployment Process: +# 1. Checkout repository code +# 2. Set up Java development environment +# 3. Build Kotlin/JS web application +# 4. Configure GitHub Pages +# 5. Upload built artifacts +# 6. Deploy to GitHub Pages + +# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/build-and-deploy-site.yaml + +# ############################################################################## +# DON'T EDIT THIS FILE UNLESS NECESSARY # +# ############################################################################## + +name: Build And Deploy Web App + +# Trigger conditions for the workflow +on: + workflow_dispatch: + +# Concurrency settings to manage multiple workflow runs +# This ensures orderly deployment to production environment +concurrency: + group: "web-pages" + cancel-in-progress: false + +permissions: + contents: read # Read repository contents + pages: write # Write to GitHub Pages + id-token: write # Write authentication tokens + pull-requests: write # Write to pull requests + +jobs: + build_and_deploy_web: + name: Build And Deploy Web App + uses: openMF/mifos-x-actionhub/.github/workflows/build-and-deploy-site.yaml@v1.0.2 + secrets: inherit + with: + web_package_name: 'cmp-web' # <-- Change with your web package name diff --git a/.github/workflows/cache-cleanup.yaml b/.github/workflows/cache-cleanup.yaml new file mode 100644 index 0000000000..02685f3631 --- /dev/null +++ b/.github/workflows/cache-cleanup.yaml @@ -0,0 +1,15 @@ +name: Cleanup Cache + +on: + pull_request: + types: [ closed ] + workflow_dispatch: + +jobs: + cleanup: + uses: openMF/mifos-x-actionhub/.github/workflows/cache-cleanup.yaml@v1.0.2 + with: + cleanup_pr: ${{ github.event_name == 'pull_request' && github.event.repository.private == true }} + cleanup_all: ${{ github.event_name == 'workflow_dispatch' }} + secrets: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/monthly-version-tag.yml b/.github/workflows/monthly-version-tag.yml new file mode 100644 index 0000000000..e96c136151 --- /dev/null +++ b/.github/workflows/monthly-version-tag.yml @@ -0,0 +1,66 @@ +# Automated Monthly Release Versioning Workflow +# ============================================ + +# Purpose: +# - Automatically create consistent monthly version tags +# - Implement a calendar-based versioning strategy +# - Facilitate easy tracking of monthly releases + +# Versioning Strategy: +# - Tag format: YYYY.MM.0 (e.g., 2024.01.0 for January 2024) +# - First digit: Full year +# - Second digit: Month (01-12) +# - Third digit: Patch version (starts at 0, allows for potential updates) + +# Key Features: +# - Runs automatically on the first day of each month at 3:30 AM UTC +# - Can be manually triggered via workflow_dispatch +# - Uses GitHub Actions to generate tags programmatically +# - Provides a predictable and systematic versioning approach + +# Prerequisites: +# - Repository configured with GitHub Actions +# - Permissions to create tags +# - Access to actions/checkout and tag creation actions + +# Workflow Triggers: +# - Scheduled monthly run +# - Manual workflow dispatch +# - Callable from other workflows + +# Actions Used: +# 1. actions/checkout@v4 - Checks out repository code +# 2. josStorer/get-current-time - Retrieves current timestamp +# 3. rickstaa/action-create-tag - Creates Git tags + +# Example Generated Tags: +# - 2024.01.0 (January 2024 initial release) +# - 2024.02.0 (February 2024 initial release) +# - 2024.02.1 (Potential patch for February 2024) + +# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/monthly-version-tag.yaml + +# ############################################################################## +# DON'T EDIT THIS FILE UNLESS NECESSARY # +# ############################################################################## + +name: Tag Monthly Release + +on: + # Allow manual triggering of the workflow + workflow_dispatch: + # Schedule the workflow to run monthly + schedule: + # Runs at 03:30 UTC on the first day of every month + # Cron syntax: minute hour day-of-month month day-of-week + - cron: '30 3 1 * *' + +concurrency: + group: "monthly-release" + cancel-in-progress: false + +jobs: + monthly_release: + name: Tag Monthly Release + uses: openMF/mifos-x-actionhub/.github/workflows/monthly-version-tag.yaml@v1.0.2 + secrets: inherit diff --git a/.github/workflows/multi-platform-build-and-publish.yml b/.github/workflows/multi-platform-build-and-publish.yml index 9d256dd3e4..95eb380b9d 100644 --- a/.github/workflows/multi-platform-build-and-publish.yml +++ b/.github/workflows/multi-platform-build-and-publish.yml @@ -71,7 +71,7 @@ on: target_branch: type: string - default: 'development' + default: 'dev' description: 'Target branch for release' distribute_ios_firebase: @@ -89,16 +89,6 @@ on: default: false description: Distribute iOS App to Appstore - distribute_macos_testflight: - type: boolean - default: false - description: Distribute macOS App via TestFlight (App Store Connect) - - distribute_macos_appstore: - type: boolean - default: false - description: Distribute macOS App to Appstore - permissions: contents: write id-token: write @@ -111,32 +101,27 @@ concurrency: jobs: multi_platform_build_and_publish: name: Multi-Platform Build and Publish - uses: openMF/mifos-x-actionhub/.github/workflows/multi-platform-build-and-publish.yaml@v1.0.7 + uses: openMF/mifos-x-actionhub/.github/workflows/multi-platform-build-and-publish.yaml@v1.0.3 with: - java-version: 21 release_type: ${{ inputs.release_type }} target_branch: ${{ inputs.target_branch }} - android_package_name: 'cmp-android' - ios_package_name: 'cmp-ios' - desktop_package_name: 'cmp-desktop' - web_package_name: 'cmp-web' - tester_groups: 'mifos-mobile-apps' - app_identifier: 'org.mifos.mobile' + android_package_name: 'cmp-android' # <-- Change this to your android package name + ios_package_name: 'cmp-ios' # <-- Change this to your ios package name + desktop_package_name: 'cmp-desktop' # <-- Change this to your desktop package name + web_package_name: 'cmp-web' # <-- Change this to your web package name + tester_groups: 'mifos-mobile-apps' # <-- Change this to your Firebase tester group + app_identifier: 'org.mifos.kmp.template' git_url: 'git@github.com:openMF/ios-provisioning-profile.git' - git_branch: 'mifos-mobile' + git_branch: 'master' match_type: 'adhoc' - provisioning_profile_name: 'match AdHoc org.mifos.mobile' - firebase_app_id: '1:728434912738:ios:ee2e0815a6915b351a1dbb' - metadata_path: './fastlane/metadata/ios' + provisioning_profile_name: 'match AdHoc org.mifos.kmp.template' + firebase_app_id: '1:728434912738:ios:1d81f8e53ca7a6f31a1dbb' + metadata_path: './fastlane/metadata' use_cocoapods: true # <-- Set to true if using CocoaPods integration for KMP shared_module: ':cmp-shared' # <-- Gradle path to your shared KMP module (e.g., :shared) - cmp_desktop_dir: 'cmp-desktop' - keychain_name: signing.keychain-db # optional distribute_ios_firebase: ${{ inputs.distribute_ios_firebase }} distribute_ios_testflight: ${{ inputs.distribute_ios_testflight }} distribute_ios_appstore: ${{ inputs.distribute_ios_appstore }} - distribute_macos_testflight: ${{ inputs.distribute_macos_testflight }} - distribute_macos_appstore: ${{ inputs.distribute_macos_appstore }} secrets: original_keystore_file: ${{ secrets.ORIGINAL_KEYSTORE_FILE }} original_keystore_file_password: ${{ secrets.ORIGINAL_KEYSTORE_FILE_PASSWORD }} @@ -151,12 +136,6 @@ jobs: notarization_apple_id: ${{ secrets.NOTARIZATION_APPLE_ID }} notarization_password: ${{ secrets.NOTARIZATION_PASSWORD }} notarization_team_id: ${{ secrets.NOTARIZATION_TEAM_ID }} - keychain_password: ${{ secrets.KEYCHAIN_PASSWORD }} - certificates_password: ${{ secrets.CERTIFICATES_PASSWORD }} - mac_app_distribution_certificate_b64: ${{ secrets.MAC_APP_DISTRIBUTION_CERTIFICATE_B64 }} - mac_installer_distribution_certificate_b64: ${{ secrets.MAC_INSTALLER_DISTRIBUTION_CERTIFICATE_B64 }} - mac_embedded_provision_b64: ${{ secrets.MAC_EMBEDDED_PROVISION_B64 }} - mac_runtime_provision_b64: ${{ secrets.MAC_RUNTIME_PROVISION_B64 }} appstore_key_id: ${{ secrets.APPSTORE_KEY_ID }} appstore_issuer_id: ${{ secrets.APPSTORE_ISSUER_ID }} appstore_auth_key: ${{ secrets.APPSTORE_AUTH_KEY }} diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 0452cca62e..42c3a6665f 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -13,7 +13,7 @@ ### Workflow Jobs # 1. **Setup**: Prepares the build environment # - Checks out repository code -# - Sets up Java (configurable; defaults to 17) +# - Sets up Java 17 # - Configures Gradle # - Manages dependency caching # @@ -36,7 +36,7 @@ # - Generates platform-specific executables and packages # ### Prerequisites -# - Java (configurable; default 17) +# - Java 17 # - Gradle # - Configured build scripts for: # - Android module @@ -49,16 +49,10 @@ ### Configuration Parameters # The workflow requires two input parameters: # -# | Parameter | Description | Type | Required | -# |------------------------|------------------------------------|--------|-----------| -# | `android_package_name` | Name of the Android project module | String | Yes | -# | `desktop_package_name` | Name of the Desktop project module | String | Yes | -# |`web_package_name` | Name of the Web (Kotlin/JS) project/module | String | No| -# |`ios_package_name` | Name of the iOS project/module | String | No | -# |`build_ios` | Build iOS targets as part of PR checks | Boolean | No | -# |`use_cocoapods` | Use CocoaPods for iOS integration | Boolean | No | -# |`shared_module | Path of the shared KMP module | String | (required when build_ios=true) | -# |`java-version | Java version to use (configurable; defaults to 17)| No | +# | Parameter | Description | Type | Required | +# |------------------------|------------------------------------|--------|----------| +# | `android_package_name` | Name of the Android project module | String | Yes | +# | `desktop_package_name` | Name of the Desktop project module | String | Yes | # # https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/pr-check.yaml @@ -68,18 +62,18 @@ # ############################################################################## -name: PR Checks for KMP +name: PR Checks # Trigger conditions for the workflow on: push: - branches: [ development ] # Runs on pushes to dev branch + branches: [ dev ] # Runs on pushes to dev branch pull_request: - branches: [ development ] # Runs on pushes to dev branch + branches: [ dev ] # Runs on pushes to dev branch # Concurrency settings to prevent multiple simultaneous workflow runs concurrency: - group: pr-kmp-${{ github.ref }} + group: pr-${{ github.ref }} cancel-in-progress: true # Cancels previous runs if a new one is triggered permissions: @@ -87,9 +81,8 @@ permissions: jobs: pr_checks: - name: PR Checks KMP - uses: openMF/mifos-x-actionhub/.github/workflows/pr-check.yaml@v1.0.7 - secrets: inherit + name: PR Checks + uses: openMF/mifos-x-actionhub/.github/workflows/pr-check.yaml@v1.0.3 with: android_package_name: 'cmp-android' # <-- Change Your Android Package Name desktop_package_name: 'cmp-desktop' # <-- Change Your Desktop Package Name @@ -98,4 +91,3 @@ jobs: build_ios: true # <-- Change to 'false' if you don't want to build iOS use_cocoapods: true shared_module: ':cmp-shared' - java-version: '21' diff --git a/.github/workflows/promote-to-production.yml b/.github/workflows/promote-to-production.yml index 8099c4ffa6..081e3d629f 100644 --- a/.github/workflows/promote-to-production.yml +++ b/.github/workflows/promote-to-production.yml @@ -43,7 +43,7 @@ # end # ``` -# https://github.com/openMF/mifos-mobile-github-actions/blob/main/.github/workflows/promote-to-production.yaml +# https://github.com/openMF/mifos-x-actionhub/blob/main/.github/workflows/promote-to-production.yaml # ############################################################################## # DON'T EDIT THIS FILE UNLESS NECESSARY # @@ -70,6 +70,6 @@ jobs: # Job to promote app from beta to production in Play Store play_promote_production: name: Promote Beta to Production Play Store - uses: openMF/mifos-x-actionhub/.github/workflows/promote-to-production.yaml@v1.0.7 + uses: openMF/mifos-x-actionhub/.github/workflows/promote-to-production.yaml@v1.0.2 secrets: playstore_creds: ${{ secrets.PLAYSTORECREDS }} diff --git a/.github/workflows/sync-dirs.yaml b/.github/workflows/sync-dirs.yaml index a2d5ab9cdc..b71f8ed3c6 100644 --- a/.github/workflows/sync-dirs.yaml +++ b/.github/workflows/sync-dirs.yaml @@ -8,11 +8,10 @@ on: required: true type: string schedule: - - cron: '*/10 * * * *' + - cron: '0 0 * * 1' jobs: sync-directories: - if: github.repository != 'openMF/kmp-project-template' runs-on: ubuntu-latest permissions: contents: write @@ -23,7 +22,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 - ref: development + ref: dev - name: Setup Git config run: | @@ -32,8 +31,7 @@ jobs: - name: Add upstream remote and fetch run: | - UPSTREAM="${{ inputs.upstream || 'https://github.com/openMF/kmp-project-template.git' }}" - git remote add upstream "$UPSTREAM" || true + git remote add upstream ${{ inputs.upstream }} || true git fetch upstream || exit 1 - name: Check upstream/dev exists @@ -178,8 +176,8 @@ jobs: # Preserve root-level exclusions before sync preserve_root_files - # Switch to development branch - git checkout development + # Switch to dev branch + git checkout dev # Sync directories for dir in "${DIRS[@]}"; do @@ -202,7 +200,7 @@ jobs: # Sync files for file in "${FILES[@]}"; do - dir=$(dirname "$file") + local dir=$(dirname "$file") if ! should_exclude "$dir" "$file"; then echo "Syncing $file..." git checkout "${{ env.TEMP_BRANCH }}" -- "$file" || true @@ -270,4 +268,4 @@ jobs: labels: | sync automated pr - base: development \ No newline at end of file + base: dev \ No newline at end of file diff --git a/.github/workflows/tag-weekly-release.yml b/.github/workflows/tag-weekly-release.yml index cd90ab15fd..9607410dbc 100644 --- a/.github/workflows/tag-weekly-release.yml +++ b/.github/workflows/tag-weekly-release.yml @@ -1,29 +1,104 @@ +# Weekly Release Tagging and Beta Deployment Workflow +# =================================================== + +# Purpose: +# - Automate weekly version tagging for consistent software versioning +# - Trigger automated beta releases across multiple platforms +# - Maintain a predictable release cycle + +# Workflow Overview: +# - Runs automatically every Sunday at 4:00 AM UTC +# - Supports manual triggering via workflow_dispatch +# - Utilizes Gradle Reckon plugin for intelligent versioning +# - Triggers multi-platform build and publish workflow + +# Key Features: +# - Automatic semantic versioning +# - Cross-platform release automation +# - Configurable target branch for releases +# - Full repository history checkout for accurate versioning + +# Versioning Strategy: +# - Uses Reckon Gradle plugin for semantic versioning +# - Generates production-ready (final) version tags +# - Provides consistent and predictable version incrementation + +# Release Process: +# 1. Checkout repository with full commit history +# 2. Setup Java 17 development environment +# 3. Create and push new version tag +# 4. Trigger multi-platform build and publish workflow + +# Prerequisites: +# - Gradle project configured with Reckon plugin +# - Java 17 development environment +# - Configured multi-platform build workflow +# - GitHub Actions permissions for workflow dispatch + +# Workflow Inputs: +# - target_branch: Branch to use for releases (default: 'dev') +# Allows flexible release targeting across different branches + +# Security Considerations: +# - Uses GitHub's native GITHUB_TOKEN for authentication +# - Controlled workflow dispatch with specific inputs +# - Limited to authorized repository members + +# Potential Use Cases: +# - Regular software release cycles +# - Automated beta testing distributions +# - Consistent multi-platform deployment + +# Workflow Triggers: +# - Scheduled weekly run (Sunday 4:00 AM UTC) +# - Manual workflow dispatch +# - Callable from other workflows + +# ############################################################################## +# DON'T EDIT THIS FILE UNLESS NECESSARY # +# ############################################################################## + name: Tag Weekly Release on: + # Allow manual triggering of the workflow workflow_dispatch: + # Schedule the workflow to run weekly schedule: + # Runs at 04:00 UTC every Sunday + # Cron syntax: minute hour day-of-month month day-of-week - cron: '0 4 * * 0' + +concurrency: + group: "weekly-release" + cancel-in-progress: false + jobs: tag: name: Tag Weekly Release runs-on: ubuntu-latest steps: + # Checkout the repository with full history for proper versioning - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Set up JDK 21 + # Setup Java environment for Gradle operations + - name: Set up JDK 17 uses: actions/setup-java@v4.2.2 with: distribution: 'temurin' - java-version: '21' + java-version: '17' + # Create and push a new version tag using Reckon + # This uses the 'final' stage for production-ready releases - name: Tag Weekly Release env: - GITHUB_TOKEN: ${{ secrets.TAG_PUSH_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: ./gradlew :reckonTagPush -Preckon.stage=final + # Trigger the build and publish workflow for beta release + # This starts the process of building and deploying the app to various platforms - name: Trigger Workflow uses: actions/github-script@v7 with: @@ -31,9 +106,10 @@ jobs: github.rest.actions.createWorkflowDispatch({ owner: context.repo.owner, repo: context.repo.repo, - workflow_id: 'android-release.yml', - ref: 'development', + workflow_id: 'multi-platform-build-and-publish.yml', + ref: 'dev', inputs: { "release_type": "beta", }, - }) \ No newline at end of file + }) + diff --git a/.run/cmp-android.run.xml b/.run/cmp-android.run.xml new file mode 100644 index 0000000000..3750e7d078 --- /dev/null +++ b/.run/cmp-android.run.xml @@ -0,0 +1,74 @@ + + + + + \ No newline at end of file diff --git a/.run/cmp-desktop.run.xml b/.run/cmp-desktop.run.xml index 88186e065a..32bd0b3af3 100644 --- a/.run/cmp-desktop.run.xml +++ b/.run/cmp-desktop.run.xml @@ -1,11 +1,6 @@ -