Skip to content

Conversation

@takenagain
Copy link
Collaborator

@takenagain takenagain commented Apr 7, 2025

  • Updated macOS and iOS Podfile.lock dependency versions, primarily related to the recent Firebase version bump in pubspec.yaml.
  • Updated the pinned SDK version to include the changes from #45

Summary by CodeRabbit

  • New Features

    • Enhanced integration with Google services to provide a smoother connection to external service features.
    • Updated Firebase configuration to support Windows platforms, ensuring seamless operation without errors.
  • Chores

    • Refined build settings with improved structural placeholders to facilitate future enhancements.
    • Added a step in the GitHub Actions workflow to address Firebase build errors related to Google Play Services.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 7, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

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

Walkthrough

This pull request makes configuration updates for Google services and Firebase across multiple platforms. It adds the Google services plugin declarations to both Android build files and introduces empty configuration arrays for iOS build phases. Additionally, the Firebase options handling is modified to support Windows by returning appropriate options instead of throwing an error, and a comment in a web file has been updated.

Changes

File(s) Change Summary
android/app/build.gradle
android/settings.gradle
Added Google services plugin declaration for Firebase support; new plugin IDs and versions are included within FlutterFire configuration comments.
ios/Runner.xcodeproj/project.pbxproj Added empty inputPaths and outputPaths arrays in the [CP] Copy Pods Resources and [CP] Embed Pods Frameworks build phases.
lib/firebase_options.dart Modified the DefaultFirebaseOptions getter to return Windows Firebase options instead of throwing an error when the platform is Windows.
web/kdf/res/kdf_wrapper.dart Updated a comment to suggest migrating the KDF JavaScript bootstrapper to Dart, with no changes to functionality.
.github/actions/releases/setup-android/action.yml Added a new step in GitHub Actions to comment out the Google Play Services import in the android/app/build.gradle file to address a Firebase build error related to the google-services.json file.

Sequence Diagram(s)

sequenceDiagram
    participant App as Application
    participant Options as DefaultFirebaseOptions.currentPlatform

    App->>Options: Request Firebase options
    alt Platform is Windows
        Options-->>App: Return Windows Firebase options
    else Other Platforms
        Options-->>App: Throw UnsupportedError
    end
Loading

Suggested reviewers

  • ShantanuSharma9873
  • AndrewDelaney
  • CharlVS

Poem

Hopping through updates with a joyful beat,
I add new plugins to keep the build complete.
In iOS phases, paths now lie in wait,
And on Windows, Firebase smiles, feeling great.
Let our code dance like me on a sunny day,
With every fix, I leap and play! 🐇


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@takenagain takenagain self-assigned this Apr 7, 2025
@takenagain
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 7, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5ef9d2e and 3296e5b.

⛔ Files ignored due to path filters (2)
  • ios/Podfile.lock is excluded by !**/*.lock
  • macos/Podfile.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • android/app/build.gradle (1 hunks)
  • android/settings.gradle (1 hunks)
  • ios/Runner.xcodeproj/project.pbxproj (2 hunks)
  • lib/firebase_options.dart (1 hunks)
  • web/kdf/res/kdf_wrapper.dart (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Build Desktop (windows)
  • GitHub Check: Build Desktop (macos)
  • GitHub Check: Build Mobile (iOS)
🔇 Additional comments (5)
web/kdf/res/kdf_wrapper.dart (1)

1-3: Documentation update for KDF wrapper

The comment has been expanded to suggest migrating the KDF JavaScript bootstrapper to Dart and compiling it to JavaScript. This is a good note for future development planning.

android/app/build.gradle (1)

3-5: Firebase Google Services plugin added correctly

The Google Services plugin has been properly added within the FlutterFire Configuration block. This is necessary for Firebase integration in Android.

android/settings.gradle (1)

23-25: Google Services plugin version configured correctly

The Google Services plugin (version 4.3.15) has been properly added at the project level within the FlutterFire Configuration block. This matches the plugin declaration in app/build.gradle.

ios/Runner.xcodeproj/project.pbxproj (2)

275-282: Clarify the addition of empty inputPaths and outputPaths in [CP] Copy Pods Resources

The addition of empty inputPaths and outputPaths arrays provides explicit placeholders for potential future entries. This is acceptable as long as it is intentional. However, please verify that leaving these arrays empty does not trigger any build-phase warnings or unexpected behavior in Xcode.


311-318: Validate empty arrays for [CP] Embed Pods Frameworks build phase

Similar to the previous section, empty inputPaths and outputPaths arrays have been added in the [CP] Embed Pods Frameworks build phase. This maintains consistency and reserves the structure for future modifications. Please ensure that these empty arrays meet the intended configuration and will not cause any issues in your build process.

@github-actions
Copy link

github-actions bot commented Apr 7, 2025

Visit the preview URL for this PR (updated for commit 9f5ab99):

https://walletrc--pull-2594-merge-0l35uqu0.web.app

(expires Mon, 14 Apr 2025 20:52:02 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

@takenagain takenagain force-pushed the build/update-podfile-locks branch from 097ac33 to 403d2e9 Compare April 7, 2025 11:46
@takenagain
Copy link
Collaborator Author

@coderabbitai review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 7, 2025

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
.github/actions/releases/setup-android/action.yml (2)

35-35: Remove Trailing Spaces

Line 35 contains trailing spaces (as flagged by YAMLlint). Removing these unnecessary spaces will help maintain clean YAML formatting and avoid potential linting errors.

🧰 Tools
🪛 YAMLlint (1.35.1)

[error] 35-35: trailing spaces

(trailing-spaces)


36-41: Review Google Play Services Import Commenting Step

The new step to comment out the Google Play Services import in android/app/build.gradle is a practical workaround for the Firebase build error when no valid google-services.json is present. However, the sed command uses a generic pattern that might unintentionally match or miss variations in the gradle file. To increase robustness, consider anchoring the regex to the start of the line and allowing flexible spacing. For example:

-        sed -i 's/id .com\.google\.gms\.google-services./\/\/ id .com\.google\.gms\.google-services./' android/app/build.gradle
+        sed -i 's/^\(id \+[com\.google\.gms\.google-services].*\)$/\/\/ \1/' android/app/build.gradle

This suggestion is optional if your current command reliably achieves the desired result in your target environment.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3296e5b and 403d2e9.

⛔ Files ignored due to path filters (2)
  • packages/komodo_ui_kit/pubspec.lock is excluded by !**/*.lock
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .github/actions/releases/setup-android/action.yml (1 hunks)
  • lib/firebase_options.dart (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.35.1)
.github/actions/releases/setup-android/action.yml

[error] 35-35: trailing spaces

(trailing-spaces)

⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: Build Desktop (windows)
  • GitHub Check: Build Mobile (Android)
  • GitHub Check: Build Mobile (iOS)
🔇 Additional comments (2)
lib/firebase_options.dart (2)

30-30: Windows platform support properly implemented

The code now correctly returns the Windows Firebase options instead of throwing an UnsupportedError. This change enables Firebase functionality on Windows, consistent with how other supported platforms are handled.


79-87: Windows Firebase configuration properly added

The Windows FirebaseOptions constant is now properly defined with all required fields, completing the Firebase support for Windows platform. The structure follows the same pattern as other platform configurations, including the appropriate fields needed for Windows.

@takenagain takenagain marked this pull request as ready for review April 7, 2025 12:04
@takenagain takenagain requested a review from CharlVS April 7, 2025 12:04
CharlVS
CharlVS approved these changes Apr 7, 2025
@CharlVS CharlVS self-requested a review April 7, 2025 13:23
Comment on lines +36 to +41
# "Fixes firebase build error when no valid google-services.json is present"
- name: Comment out Google Play Services import
shell: bash
run: |
sed -i 's/id .com\.google\.gms\.google-services./\/\/ id .com\.google\.gms\.google-services./' android/app/build.gradle
echo "Google Play Services import commented out"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Release builds should fail if Firebase is not configured correctly. I will fix the root cause shortly. This also happens with macOS or iOS (can't recall which it was).

Please also create tasks for (normal priority):

Ensure this behaviour is consistent across platforms.
Amend our Firebase local setup documentation to include instructions and/or a script in our CLI package script to "de-Google" the builds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

macOS builds succeed without Firebase configs, but the app crashes on startup with a Firebase-related runtime exception.

Android builds are the only builds failing because of firebase configs currently, and because of the introduction of the com.google.gms.google-services import in this PR. The new import was added by flutterfire_cli.

All platforms, except for macOS, worked fine without valid firebase configs present - the runtime error appears to only be fatal on macOS. Linux is also not yet supported by flutterfire_cli/firebase.

defaults to building web first before iOS, ensuring that the required assets are downloaded
@CharlVS CharlVS merged commit 71ed192 into dev Apr 9, 2025
7 of 12 checks passed
@CharlVS CharlVS deleted the build/update-podfile-locks branch April 9, 2025 13:59
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.

3 participants