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

chore(recipients-app): Bump android versions and dependencies #959

Closed
wants to merge 2 commits into from

Conversation

MDikkii
Copy link
Contributor

@MDikkii MDikkii commented Nov 30, 2024

So... I tried to run the app with Android Studio Ladybug installed and made the changes until the build worked again.

The one problem with this solution is that Sentry seems to be crashing at the start. That means that we may lose the sentry logs if it can't initialize properly.

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced localization support with new tooltip and date label methods.
  • Improvements

    • Updated application namespace and ID for better identification.
    • Upgraded to Gradle 8.5 and updated plugin versions for improved compatibility.
    • Updated intl dependency to version 0.19.0 for potential new features and fixes.
  • Bug Fixes

    • Adjusted button styling logic for consistent appearance across states.
  • Chores

    • Removed unnecessary text scaling from the MediaQuery widget in tests.

Copy link

vercel bot commented Nov 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
public ⬜️ Ignored (Inspect) Visit Preview Nov 30, 2024 11:23pm

Copy link

coderabbitai bot commented Nov 30, 2024

📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes in this pull request involve multiple updates across various files in the Android and Flutter application. Key modifications include the addition of a namespace and application ID in the build.gradle file, updates to Gradle and plugin versions, enhancements to localization classes, and adjustments to button styling. Additionally, the pubspec.yaml file reflects a version update for the intl dependency, while a specific line related to text scaling is removed from a test file.

Changes

File Path Change Summary
recipients_app/android/app/build.gradle Added namespace and application ID; introduced compile and Kotlin options for Java 17 compatibility.
recipients_app/android/gradle/wrapper/gradle-wrapper.properties Updated distributionUrl from Gradle 7.4 to 8.5.
recipients_app/android/settings.gradle Updated versions of com.android.application (7.3.0 to 8.3.0) and org.jetbrains.kotlin.android (1.7.10 to 1.9.25).
recipients_app/lib/kri_intl.dart Reformatted localization delegates; added clearButtonTooltip and selectedDateLabel methods.
recipients_app/lib/ui/buttons/button_outlined_big.dart Replaced MaterialStateProperty with WidgetStateProperty for button styling.
recipients_app/lib/ui/buttons/button_small.dart Replaced MaterialStateProperty with WidgetStateProperty for button styling.
recipients_app/pubspec.yaml Updated intl dependency version from ^0.18.0 to ^0.19.0.
recipients_app/test/helpers/golden_test_device_scenario.dart Removed textScaler property from MediaQuery widget.

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 0e66857 and 4b7c871.

📒 Files selected for processing (2)
  • recipients_app/android/app/build.gradle (2 hunks)
  • recipients_app/lib/kri_intl.dart (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • recipients_app/lib/kri_intl.dart
🔇 Additional comments (2)
recipients_app/android/app/build.gradle (2)

35-35: LGTM: Namespace declaration is correctly implemented

The namespace matches the applicationId, following Android best practices.


84-91: LGTM: Java and Kotlin version configurations are properly aligned

The Java 17 and matching Kotlin JVM target are correctly configured, which is required for newer Android Gradle Plugin versions.

Let's verify the Gradle and plugin versions are compatible with Java 17:

✅ Verification successful

Java/Kotlin configuration is compatible with toolchain versions

The setup is correct and compatible:

  • Gradle 8.5 fully supports Java 17
  • Android Gradle Plugin 8.3.0 requires minimum Java 17
  • Kotlin 1.9.25 is compatible with Java 17
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check Gradle wrapper version
cat recipients_app/android/gradle/wrapper/gradle-wrapper.properties | grep 'distributionUrl'

# Check plugin versions in settings.gradle
cat recipients_app/android/settings.gradle | grep -A 1 'com.android.application\|org.jetbrains.kotlin.android'

Length of output: 519


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 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 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.

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: 2

🧹 Outside diff range and nitpick comments (1)
recipients_app/android/settings.gradle (1)

21-22: Document upgrade steps for the team

These are significant version jumps that may require additional configuration changes:

  • AGP 7.x → 8.x
  • Kotlin 1.7 → 1.9

Consider adding upgrade notes in the PR description or README about:

  1. Required Gradle version
  2. Required Java version
  3. Breaking changes and migration steps
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between b967f4e and 0e66857.

⛔ Files ignored due to path filters (1)
  • recipients_app/pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • recipients_app/android/app/build.gradle (2 hunks)
  • recipients_app/android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • recipients_app/android/settings.gradle (1 hunks)
  • recipients_app/lib/kri_intl.dart (4 hunks)
  • recipients_app/lib/ui/buttons/button_outlined_big.dart (1 hunks)
  • recipients_app/lib/ui/buttons/button_small.dart (2 hunks)
  • recipients_app/pubspec.yaml (1 hunks)
  • recipients_app/test/helpers/golden_test_device_scenario.dart (0 hunks)
💤 Files with no reviewable changes (1)
  • recipients_app/test/helpers/golden_test_device_scenario.dart
✅ Files skipped from review due to trivial changes (1)
  • recipients_app/android/gradle/wrapper/gradle-wrapper.properties
🔇 Additional comments (8)
recipients_app/lib/ui/buttons/button_outlined_big.dart (1)

24-25: Verify Flutter version compatibility for WidgetStateProperty usage

The switch from MaterialStateProperty to WidgetStateProperty needs version verification.

✅ Verification successful

WidgetStateProperty usage is compatible with Flutter version

The migration from MaterialStateProperty to WidgetStateProperty is appropriate as the project uses Flutter 3.19.6, where this change is supported. The SDK constraints (>=3.2.0) also align with this migration.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check Flutter version constraints in pubspec.yaml
rg "sdk: flutter" -A 2 "pubspec.yaml"

Length of output: 90


Script:

#!/bin/bash
# Search for pubspec files recursively
fd "pubspec.yaml"

# Check for any MaterialStateProperty to WidgetStateProperty migrations
rg "WidgetStateProperty" -A 2

Length of output: 1604


Script:

#!/bin/bash
# Check Flutter SDK constraints in the pubspec
cat recipients_app/pubspec.yaml | grep -A 5 "environment:"

Length of output: 150

recipients_app/lib/ui/buttons/button_small.dart (1)

34-36: LGTM! Consistent implementation across button components

The WidgetStateProperty implementation is consistent with ButtonOutlinedBig and maintains the same styling behavior.

Also applies to: 59-61

recipients_app/pubspec.yaml (1)

28-28: Verify breaking changes in intl 0.19.0

The upgrade from intl 0.18.0 to 0.19.0 is a minor version bump that may contain breaking changes.

✅ Verification successful

Intl 0.19.0 upgrade appears safe for this codebase

The codebase uses standard date and number formatting patterns that are stable across intl versions. All usage is concentrated in kri_intl.dart with proper locale handling and standard format strings that are compatible with 0.19.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for potential breaking changes and compatibility issues

# Search for intl usage patterns that might be affected
echo "Checking intl usage patterns..."
rg "DateFormat|NumberFormat|Intl\." -t dart

# Look for existing localization files
echo "Checking l10n/intl files..."
fd -e arb

Length of output: 4691

recipients_app/android/app/build.gradle (3)

35-36: Namespace declaration is correctly implemented.

The namespace addition is necessary for compatibility with Android Gradle Plugin 8.x and follows the recommended practice of matching the applicationId.


89-91: Kotlin JVM target correctly matches Java version.

The Kotlin JVM target is properly aligned with the Java compatibility level, ensuring consistent bytecode generation.


84-87: Consider upgrading Java version if possible.

While Java 1.8 is compatible, newer versions are available. Verify if Flutter supports using a more recent Java version for potential performance improvements and newer language features.

recipients_app/lib/kri_intl.dart (2)

416-416: LGTM!

The delegate declarations are properly implemented.

Also applies to: 665-665


461-461: LGTM!

The DatePickerDateTimeOrder property is correctly implemented.

recipients_app/android/settings.gradle Show resolved Hide resolved
Comment on lines 1134 to 1140

@override
String get clearButtonTooltip => "Clear text";

@override
// TODO: implement selectedDateLabel
String get selectedDateLabel => "Selected";
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Implement the selectedDateLabel method

The TODO comment indicates incomplete implementation. The current placeholder value "Selected" should be translated to Krio language to maintain consistency with other translations in the file.

Would you like me to help implement the proper Krio translation for this label? I can also create a GitHub issue to track this task.

@MDikkii MDikkii changed the title Bump android versions and dependencies chore(recipients-app): Bump android versions and dependencies Nov 30, 2024
@@ -27,7 +27,6 @@ class GoldenTestDeviceScenario extends StatelessWidget {
size: device.size,
padding: device.safeArea,
platformBrightness: device.brightness,
textScaler: TextScaler.linear(device.textScaleFactor),
Copy link
Contributor

Choose a reason for hiding this comment

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

Why did you removed this line? Did you run the tests and then it failed and you had to remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, new version of the dependency just show that there is no more TextScaler 🤔

@@ -25,7 +25,7 @@ dependencies:
sdk: flutter
flutter_native_splash: ^2.4.0

intl: ^0.18.0
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you are using the wrong Flutter version. We are still on 3.19.6

Copy link
Contributor

@KarinBerg KarinBerg left a comment

Choose a reason for hiding this comment

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

See Slack for why you had to do all this changes :)

@MDikkii MDikkii closed this Dec 1, 2024
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