Skip to content

HEAL 120 add Firebase Crashlytics and Google Services to healthSDK#877

Open
MozhganPeivandianSharbaf wants to merge 8 commits intomainfrom
HEAL-120-Add-Crashlytics-to-the-example-app-for-Health-SDK
Open

HEAL 120 add Firebase Crashlytics and Google Services to healthSDK#877
MozhganPeivandianSharbaf wants to merge 8 commits intomainfrom
HEAL-120-Add-Crashlytics-to-the-example-app-for-Health-SDK

Conversation

@MozhganPeivandianSharbaf
Copy link
Contributor

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf commented Feb 2, 2026

Description

ticket is here

This branch fixes CI issues related to building the Health SDK example app by properly handling google-services.json.

The example app depends on Firebase, so a valid google-services.json is required whenever the example app is built (locally or in CI).
The file is now generated at build time using a GitHub secret and is excluded from version control.

Note: Anyone who wants to build the Health SDK example app must provide their own google-services.json.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces Gradle plugin/version-catalog wiring intended to support adding Firebase Crashlytics and Google Services, and updates build configuration to use version-catalog aliases.

Changes:

  • Add pluginManagement repositories in settings.gradle.kts to enable resolving Gradle plugins from Google/Maven Central/Plugin Portal.
  • Add version-catalog entries for Firebase Crashlytics, Google Services, and SonarQube plugins and use aliases in the root build.gradle.kts.
  • Add a google-services.json file to the health SDK example app.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
settings.gradle.kts Adds pluginManagement repositories for plugin resolution.
health-sdk/example-app/google-services.json Adds Firebase configuration file for the example app.
gradle/libs.versions.toml Adds plugin versions/aliases for Crashlytics, Google Services, and SonarQube.
build.gradle.kts Switches to version-catalog aliases for plugin declarations (apply false).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf force-pushed the HEAL-120-Add-Crashlytics-to-the-example-app-for-Health-SDK branch from 9dd92b8 to f9cdaae Compare February 2, 2026 16:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MozhganPeivandianSharbaf MozhganPeivandianSharbaf force-pushed the HEAL-120-Add-Crashlytics-to-the-example-app-for-Health-SDK branch from e0a6e11 to 7916461 Compare February 5, 2026 12:53
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

Quality Gate Failed Quality Gate failed for 'Android Merchant SDK'

Failed conditions
10 Security Hotspots
0.0% Coverage on New Code (required ≥ 80%)
2 New Critical Issues (required ≤ 0)
17 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 5, 2026

Quality Gate Failed Quality Gate failed for 'Android Bank SDK'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
B Reliability Rating on New Code (required ≥ A)
41 New Code Smells (required ≤ 0)
1 New Bugs (required ≤ 0)
6 New Critical Issues (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 35 to 44
uses: actions/checkout@v3
with:
fetch-depth: 3

- name: setup java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The actions versions are inconsistent with the health-sdk.check.yml workflow. The check workflow uses actions/checkout@v4 and actions/setup-java@v4 (lines 59 and 61 in health-sdk.check.yml), but this job uses v3 for both actions. For consistency and to use the latest stable versions, consider updating to v4:

  • actions/checkout@v4
  • actions/setup-java@v4

Copilot uses AI. Check for mistakes.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 23 to +25
required: true
GOOGLE_SERVICES_JSON_B64:
required: true
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

Making GOOGLE_SERVICES_JSON_B64 a required secret creates a breaking change for workflows that call this reusable workflow. Specifically, health-sdk.release.yml (lines 15-19) calls this workflow but doesn't pass this secret, which will cause release builds to fail.

Consider one of these approaches:

  1. Make the secret optional by setting 'required: false' and handle the missing secret gracefully in the jobs that need it
  2. Update health-sdk.release.yml to pass the GOOGLE_SERVICES_JSON_B64 and SONAR_TOKEN secrets (both are now required but SONAR_TOKEN is not passed either)

The same issue applies to SONAR_TOKEN which is also required but not passed by health-sdk.release.yml.

Suggested change
required: true
GOOGLE_SERVICES_JSON_B64:
required: true
required: false
GOOGLE_SERVICES_JSON_B64:
required: false

Copilot uses AI. Check for mistakes.
@@ -8,6 +8,8 @@ plugins {
id("kotlin-parcelize")
alias(libs.plugins.devtools.ksp)
id ("org.sonarqube")
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The sonarqube plugin is still using the old string literal format id ("org.sonarqube") instead of using the version catalog alias like in the root build.gradle.kts (which now uses alias(libs.plugins.sonarqube)).

For consistency with the root build file and the other plugins in this file (firebase.crashlytics, google.services, devtools.ksp), consider changing this to:

alias(libs.plugins.sonarqube)

This would ensure all plugin versions are consistently managed through the version catalog.

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +5
contents: write
packages: write
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

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

The permissions have been changed from "contents: read" to "contents: write" and "packages: write" has been added. These are overly broad permissions for a workflow that only builds and checks code without publishing anything.

The original "contents: read" permission was sufficient since this workflow only needs to read the repository code. Adding write permissions introduces unnecessary security risk if this workflow were ever compromised. Consider reverting these permission changes unless there's a specific requirement for write access.

Suggested change
contents: write
packages: write
contents: read

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@abolfazlimahdi abolfazlimahdi left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you!

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.

2 participants