Skip to content

chore(build-logic): add missing dependencies to version catalog & missing build logic files - #2572

Merged
therajanmaurya merged 10 commits into
openMF:developmentfrom
amanna13:chore/sync-version-catalogue-buildlogic
Jan 30, 2026
Merged

chore(build-logic): add missing dependencies to version catalog & missing build logic files#2572
therajanmaurya merged 10 commits into
openMF:developmentfrom
amanna13:chore/sync-version-catalogue-buildlogic

Conversation

@amanna13

@amanna13 amanna13 commented Jan 12, 2026

Copy link
Copy Markdown
Member

Fixes - Jira-#598

chore(build-logic): complete version catalogue and build logic setup

Screen_recording_20260129_195045.mp4
image
  • Add missing dependencies to version catalogue

  • Finalize build logic configuration

  • Run the static analysis check ./gradlew check or ci-prepush.sh to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them.

@coderabbitai

coderabbitai Bot commented Jan 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 182 files, which is 32 over the limit of 150.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

🧪 Unit Test Generation v2 is now available!

We have significantly improved our unit test generation capabilities.

To enable: Add this to your .coderabbit.yaml configuration:

reviews:
  finishing_touches:
    unit_tests:
      enabled: true

Try it out by using the @coderabbitai generate unit tests command on your code files or under ✨ Finishing Touches on the walkthrough!

Have feedback? Share your thoughts on our Discord thread!


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@amanna13
amanna13 force-pushed the chore/sync-version-catalogue-buildlogic branch 2 times, most recently from 0f2fe17 to b70a147 Compare January 16, 2026 14:03
@amanna13
amanna13 marked this pull request as ready for review January 16, 2026 14:06
@amanna13
amanna13 marked this pull request as draft January 16, 2026 14:16
- Add missing dependencies to version catalogue
- Finalize build logic configuration
@amanna13
amanna13 force-pushed the chore/sync-version-catalogue-buildlogic branch from b70a147 to 6c41344 Compare January 16, 2026 14:24
@amanna13
amanna13 marked this pull request as ready for review January 16, 2026 14:43
Comment thread build-logic/convention/build.gradle.kts

@biplab1 biplab1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. This can be merged.

@biplab1

biplab1 commented Jan 22, 2026

Copy link
Copy Markdown
Contributor

@amanna13 Have you checked the build on your PR branch? Is the app building fine? Please upload a screen recording in the PR description.

@amanna13

Copy link
Copy Markdown
Member Author

@amanna13 Have you checked the build on your PR branch? Is the app building fine? Please upload a screen recording in the PR description.

@biplab1 Yes it's building fine, attaching a screen recording soon. The ony issue was, there was a build failure for the demoDebug variant of the client app. You can see that in this PR I have commented out the apply("org.convention.android.application.firebase") inside build-logic > convention > AndroidApplicationConventionPlugin to temporarily fix it.

The actual issue is in cmp-android/google-services.json, there’s no matching Firebase client entry for DemoDebug

@biplab1

biplab1 commented Jan 23, 2026

Copy link
Copy Markdown
Contributor

@amanna13 Have you checked the build on your PR branch? Is the app building fine? Please upload a screen recording in the PR description.

@biplab1 Yes it's building fine, attaching a screen recording soon. The ony issue was, there was a build failure for the demoDebug variant of the client app. You can see that in this PR I have commented out the apply("org.convention.android.application.firebase") inside build-logic > convention > AndroidApplicationConventionPlugin to temporarily fix it.

The actual issue is in cmp-android/google-services.json, there’s no matching Firebase client entry for DemoDebug

@amanna13 I think we can handle this issue in a separate ticket. Please create a ticket to update google-services.json and handle this convention plugin error which results in a package name different from that listed in the google-services.json.

@amanna13

Copy link
Copy Markdown
Member Author

@biplab1 So it's commented out for now. so should i request for a merge ?!

@niyajali

Copy link
Copy Markdown
Collaborator

@amanna13 Have you checked the build on your PR branch? Is the app building fine? Please upload a screen recording in the PR description.

@biplab1 Yes it's building fine, attaching a screen recording soon. The ony issue was, there was a build failure for the demoDebug variant of the client app. You can see that in this PR I have commented out the apply("org.convention.android.application.firebase") inside build-logic > convention > AndroidApplicationConventionPlugin to temporarily fix it.

The actual issue is in cmp-android/google-services.json, there’s no matching Firebase client entry for DemoDebug

No, never do that instead copy the google services file from another project(https://github.com/openMF/kmp-project-template/blob/dev/cmp-android/google-services.json) and add these client info

    {
      "client_info": {
        "mobilesdk_app_id": "1:728434912738:android:53d0930e402622611a1dbb",
        "android_client_info": {
          "package_name": "com.mifos.mifosxdroid.demo.debug"
        }
      },
      "oauth_client": [
        {
          "client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
          "client_type": 3
        }
      ],
      "api_key": [
        {
          "current_key": "AIzaSyCUz3P8uUExMFcPHa1Ga3DBKhjK5zxNn70"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
              "client_type": 3
            }
          ]
        }
      }
    },
    {
      "client_info": {
        "mobilesdk_app_id": "1:728434912738:android:53d0930e402622611a1dbb",
        "android_client_info": {
          "package_name": "com.mifos.mifosxdroid.debug"
        }
      },
      "oauth_client": [
        {
          "client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
          "client_type": 3
        }
      ],
      "api_key": [
        {
          "current_key": "AIzaSyCUz3P8uUExMFcPHa1Ga3DBKhjK5zxNn70"
        }
      ],
      "services": {
        "appinvite_service": {
          "other_platform_oauth_client": [
            {
              "client_id": "728434912738-4sc51o624viccn8oi14f2mi77tljrdns.apps.googleusercontent.com",
              "client_type": 3
            }
          ]
        }
      }
    },

@niyajali

Copy link
Copy Markdown
Collaborator

And there are some recent changes in the template project, take a look into that and do the required changes accordingly

@amanna13

Copy link
Copy Markdown
Member Author

Hey @niyajali, I tried with what you suggested with the google-services and it did work.

  • I'm keeping Crashlytics true, its currently set on true for mifos-mobile but it was false in android-client

And there are some recent changes in the template project, take a look into that and do the required changes accordingly

Let's keep it what we are currently doing for now, because of this PR the core-base haven't merged yet and a lot of other PR's are waiting for that.
Dependency updates and all can be addressed once this is merged in a seperate PR, because a lot of dependencies like "room" was upgraded which introduced stricter type validation, which is currently failing I checked.

@amanna13
amanna13 requested review from biplab1 and niyajali January 26, 2026 10:24
@biplab1

biplab1 commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

@amanna13 I am curious - since you might have built using both the settings:
image

Does the compile and build times for debug variant build gets affected? Can you verify this:

Then those need to be updated to improve the build and compile time for debug builds

@amanna13

amanna13 commented Jan 26, 2026

Copy link
Copy Markdown
Member Author

Does the compile and build times for debug variant build gets affected?

@biplab1 I verified the Debug build performance by running in the same environment. With mappingFileUpload enabled, the Debug build took ~5m 30s, compared to ~3m 52s when disabled, somewhat close to 30% improvement

@biplab1

biplab1 commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

Does the compile and build times for debug variant build gets affected?

@biplab1 I verified the Debug build performance by running in the same environment. With mappingFileUpload enabled, the Debug build took ~5m 30s, compared to ~3m 52s when disabled, somewhat close to 30% improvement

@amanna13 I am assuming you did a clean build before testing each of the settings.

Please keep the mappingFileUpload disabled for now in this project, other projects which have it enabled will also be disabled as recommended by @niyajali .

Can you also address this as pointed out by @niyajali:

And there are some recent changes in the template project, take a look into that and do the required changes accordingly

For dependencies, I think we can update them to a version where the changes in the project are minimal and manageable at the current moment.

@amanna13

amanna13 commented Jan 27, 2026

Copy link
Copy Markdown
Member Author

I am assuming you did a clean build before testing each of the settings.

Yes I did clean build. Okay sure I will disable that.

For dependencies, I think we can update them to a version where the changes in the project are minimal and manageable at the current moment.

Yeah, that will work, it will take me one more day to do so. I was saying previously to merge this as it is, keeping in mind the priority of this task.

@biplab1

biplab1 commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

@amanna13 If you face any problems, feel free to start a Slack thread tagging @niyajali and me to expedite the work on this PR.

@amanna13

amanna13 commented Jan 29, 2026

Copy link
Copy Markdown
Member Author

@biplab1 Done with all the updations. please have a look.
(Screen recording after build updated).

Comment thread gradle.properties

@biplab1 biplab1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. This can be merged.

@therajanmaurya
therajanmaurya merged commit b7ae284 into openMF:development Jan 30, 2026
3 checks passed
therajanmaurya pushed a commit to therajanmaurya/kmp-project-template that referenced this pull request May 22, 2026
…ript) — no new files

Per review feedback: the right place for this fix is the sync-dirs flow itself,
not a separate workflow that runs after-the-fact. Removed the dedicated workflow
+ companion script from the previous commit; integrated the logic inline into
both .github/workflows/sync-dirs.yaml and sync-dirs.sh.

What changed vs the previous commit on this branch (ceb1a79):

  - DELETED .github/workflows/verify-libs-resolved.yml (-52 lines)
  - DELETED scripts/verify_libs_resolved.sh (-180 lines)

  + .github/workflows/sync-dirs.yaml — new step "Heal libs.versions.toml" between
    "Sync directories and files" and "Clean up temporary branch". Runs the same
    detection logic, but instead of just failing the gate, it AUTO-PULLS the
    missing alias entries (and any version.ref keys they depend on) directly from
    the upstream catalog accessible via $TEMP_BRANCH. The healed catalog is then
    committed as part of the same sync PR — no separate fix-up PR ever needed.

  + sync-dirs.sh — new heal_libs_versions_toml() function invoked between the
    sync loop and temp-branch cleanup. Same heal semantics for local CLI use.
    The downstream `git add` is widened to include gradle/libs.versions.toml
    when the heal touched it.

Behavior:

  1. Sync-dirs pulls build-logic from upstream (existing behavior, unchanged)
  2. Heal step inspects every libs.<X> reference in the freshly-synced build-logic
  3. For each ref whose alias is missing from consumer's gradle/libs.versions.toml,
     pull the matching line from upstream (TEMP_BRANCH) and insert it into the
     appropriate [versions] / [libraries] / [plugins] section
  4. If an alias version.refs an undeclared version key, that version key is also
     pulled and inserted into [versions] BEFORE the alias
  5. Healed entries land in the same sync PR — discovery + remediation in one
     atomic workflow run, instead of a "fails-now-fix-tomorrow" split

Verified against field-officer's pre-fix state (catalog reverted to commit
408d9cba — the broken state from ~24h ago, before the manual #2691 catch-up):
  - Pre-heal: 5 missing aliases — kover-gradlePlugin, kover-convention,
    androidx-room-gradle-plugin, kmp-product-flavors-plugin, spotless-gradle
  - Post-heal: 7 entries inserted (5 aliases + 2 referenced versions kmpProductFlavors,
    kover). All build-logic libs.<X> refs resolve.

Eliminates the failure mode that's been hand-fixed at least 3 times in 4 months
on the field-officer fork (openMF/mifos-x-field-officer-app#2572, #2604, #2691).
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.

5 participants