-
Notifications
You must be signed in to change notification settings - Fork 671
chore(build-logic): add missing dependencies to version catalog & missing build logic files #2572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
chore(build-logic): add missing dependencies to version catalog & missing build logic files #2572
Conversation
|
Important Review skippedToo many files! This PR contains 179 files, which is 79 over the limit of 100. You can disable this status message by setting the
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. Comment |
0f2fe17 to
b70a147
Compare
- Add missing dependencies to version catalogue - Finalize build logic configuration
b70a147 to
6c41344
Compare
| } | ||
| register("androidFirebase") { | ||
| id = "mifos.android.application.firebase" | ||
| id = "org.convention.android.application.firebase" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we changing this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have followed how the KMP template sync was done in mifos-mobile and mobile-wallet. Those have this changes
Please have a look into this similar PRs
https://github.com/openMF/mifos-mobile/pull/2967/files
https://github.com/openMF/mobile-wallet/pull/1894/files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amanna13 using 2 different types of id will only create confusion, if you are replacing mifos with org.convention you should do it in the whole project or keep it as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's a gradual replacement. This pr is intended to fix the build for the core-base which got merged recently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@itsPronay I believe only project specific ones use mifos as a prefix and others use org.convention, which are common to all projects and can be used as it is from kmp-project-template.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@biplab1 I see, I got confused earlier
biplab1
left a comment
There was a problem hiding this comment.
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.
|
@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 The actual issue is in |
@amanna13 I think we can handle this issue in a separate ticket. Please create a ticket to update |
|
@biplab1 So it's commented out for now. so should i request for a merge ?! |
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 |
|
And there are some recent changes in the template project, take a look into that and do the required changes accordingly |
| // enabled if a Firebase backend is available and configured in | ||
| // google-services.json. | ||
| configure<CrashlyticsExtension> { | ||
| mappingFileUploadEnabled = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be true, since Crashlytics is configured for all projects.
| mappingFileUploadEnabled = false | |
| mappingFileUploadEnabled = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't required for debug builds, improving build and compile times. For production release builds, it will be overridden through the AndroidManifest configuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the Google Services client: we have 2 product flavors and 2 build types configured across all projects, creating 4 Android build variants, plus iOS and web apps. We haven't registered the debug builds in Firebase because there's a limit of 20 apps per free account. Registering unnecessary debug variants would consume our quota and prevent us from adding new apps when needed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be true, since Crashlytics is configured for all projects.
@niyajali I referred the following files and a comment:
- https://github.com/openMF/kmp-project-template/blob/dev/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt
- https://github.com/openMF/mifos-mobile/blob/development/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt
- https://github.com/openMF/mobile-wallet/blob/development/build-logic/convention/src/main/kotlin/AndroidApplicationFirebaseConventionPlugin.kt
- https://mifos.slack.com/archives/C086SHY8ZPF/p1756520217688219?thread_ts=1756458555.957409&cid=C086SHY8ZPF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then those need to be updated to improve the build and compile time for debug builds
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Regarding the Google Services client: we have 2 product flavors and 2 build types configured across all projects, creating 4 Android build variants, plus iOS and web apps. We haven't registered the debug builds in Firebase because there's a limit of 20 apps per free account. Registering unnecessary debug variants would consume our quota and prevent us from adding new apps when needed...
@niyajali Can we not exclude the debug build variant from the relevant Gradle task instead of supplying placeholder values in google-services.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we're overcomplicating this. Why not just copy the existing client definition and change the package name? That's a 1-2 minute task that won't break anything. Updating internal Gradle configurations is risky, I've published multiple apps and know how unpredictable Gradle can be. Most issues only show up in release builds. So it's better to stick with the mentioned approach and sometimes we need the debug variants to test the functionality by using the created client Id..
|
Hey @niyajali, I tried with what you suggested with the google-services and it did work.
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. |
|
@amanna13 I am curious - since you might have built using both the settings: Does the compile and build times for debug variant build gets affected? Can you verify this:
|
@biplab1 I verified the Debug build performance by running in the same environment. With |
@amanna13 I am assuming you did a clean build before testing each of the settings. Please keep the Can you also address this as pointed out by
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. |
Yes I did clean build. Okay sure I will disable that.
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. |
|
@amanna13 If you face any problems, feel free to start a Slack thread tagging |

Fixes - Jira-#598
chore(build-logic): complete version catalogue and build logic setup
buid.mp4
Add missing dependencies to version catalogue
Finalize build logic configuration
Run the static analysis check
./gradlew checkorci-prepush.shto make sure you didn't break anythingIf you have multiple commits please combine them into one commit by squashing them.