Skip to content
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

Fix more build errors #2488

Merged
merged 7 commits into from
Feb 20, 2025
Merged

Fix more build errors #2488

merged 7 commits into from
Feb 20, 2025

Conversation

Mozart299
Copy link
Contributor

@Mozart299 Mozart299 commented Feb 20, 2025

Summary of Changes (What does this PR do?)

  • Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Status of maturity (all need to be checked before merging):

  • I've tested this locally
  • I consider this code done
  • This change ready to hit production in its current state
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included issue number in the "Closes #ISSUE-NUMBER" part of the "What are the relevant tickets?" section to link the issue.
  • I've updated corresponding documentation for the changes in this PR.
  • I have written unit and/or e2e tests for my change(s).

How should this be manually tested?

  • Please include the steps to be done inorder to setup and test this PR.

What are the relevant tickets?

Screenshots (optional)

Summary by CodeRabbit

  • Chores
    • Refined configuration management for external mapping and location services.
    • Removed legacy settings to streamline the handling of external API keys.

Copy link

coderabbitai bot commented Feb 20, 2025

📝 Walkthrough

Walkthrough

The changes update the Android configuration by streamlining API key management. The build.gradle file now loads properties from a secrets.properties file and removes logic for managing Google Places API keys. In addition, the corresponding meta-data entry in AndroidManifest.xml is removed. The local.defaults.properties file is updated with new variables to differentiate between production and development environments for Maps and Places APIs.

Changes

Files Change Summary
mobile-v3/.../build.gradle
mobile-v3/.../AndroidManifest.xml
Added logic to load properties from a secrets.properties file in the build process; removed Google Places API key handling and its related manifest entry.
mobile-v3/.../local.defaults.properties Introduced new API key variables (MAPS_API_KEY_DEV, PLACES_API_KEY, and PLACES_API_KEY_DEV) to support both production and development environments.

Sequence Diagram(s)

sequenceDiagram
    participant Build as Build Process
    participant FP as secrets.properties File
    Build->>FP: Check if file exists
    alt File exists
        FP-->>Build: Send key-value pairs
        Build->>Build: Load and apply properties (e.g., Maps API key)
    else File not found
        Build->>Build: Proceed without properties
    end
Loading

Possibly related PRs

Suggested labels

ready for review

Suggested reviewers

  • Baalmart

Poem

In lines of code so crisp and neat,
Secrets load with a secure heartbeat.
Out go the keys of old, adieu,
New paths chart the API view.
A code duet in digital tone,
Where secure whispers softly drone.
🚀🎶

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 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. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @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 or @coderabbitai title 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.

@Mozart299 Mozart299 requested a review from Baalmart February 20, 2025 08:48
Copy link

@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 (1)
mobile-v3/android/app/build.gradle (1)

34-41: Unused Secrets Properties Block

The block loading secrets.properties into secretsProperties appears redundant since the secrets plugin already manages the secrets. If this code isn’t intended for future expansion, consider removing it to reduce confusion.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 76f5146 and 3e4c79a.

📒 Files selected for processing (3)
  • mobile-v3/android/app/build.gradle (1 hunks)
  • mobile-v3/android/app/src/main/AndroidManifest.xml (0 hunks)
  • mobile-v3/android/local.defaults.properties (1 hunks)
💤 Files with no reviewable changes (1)
  • mobile-v3/android/app/src/main/AndroidManifest.xml
🔇 Additional comments (4)
mobile-v3/android/local.defaults.properties (1)

1-4: API Key Variables Added Successfully

The introduction of variables for both production and development environments (for Maps and Places APIs) is clear and aligns with the intended environment differentiation. Just ensure that sensitive values are updated securely when deploying to production.

mobile-v3/android/app/build.gradle (3)

50-53: Robust Production API Key Retrieval

Fetching the production Maps API key via appProperties with a fallback to the secrets plugin is a solid approach. The accompanying exception provides clear, immediate feedback if the key is missing.


55-58: Solid Development API Key Check

Similarly, the retrieval of the development API key is handled well, with an appropriate exception thrown if it isn’t defined. This reinforces the importance of having both keys set correctly.


110-121: Streamlined Manifest Placeholders

The manifest placeholders now exclusively reference the Maps API key, which aligns with the updated key management strategy and the removal of Google Places API key support. This change simplifies the configuration.

@Baalmart Baalmart merged commit bd111b5 into staging Feb 20, 2025
32 checks passed
@Baalmart Baalmart deleted the fix-more-build-errors branch February 20, 2025 09:54
@Baalmart Baalmart mentioned this pull request Feb 20, 2025
1 task
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