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

Upgrade image_cropper from v5.0.1 to v8.0.2 with updated implementations and tests #2697

Open
wants to merge 5 commits into
base: develop-postgres
Choose a base branch
from

Conversation

may-tas
Copy link
Contributor

@may-tas may-tas commented Jan 7, 2025

What kind of change does this PR introduce?

  • Upgraded package image_cropper to v8.0.2

Issue Number:

Did you add tests for your changes?

  • Yes

Snapshots/Videos:

Screenshot 2025-01-07 at 9 34 06 PM

Summary

  • Migrated image_cropper from v5.0.1 to v8.0.2, updated implementation to meet new version requirements, and fixed related test cases.

Does this PR introduce a breaking change?

  • No

Other information

  • Breaking changes were there in the package from the version v7.0.0 :
    • cropImage(): move cropStyle and aspectRatioPresets into AndroidUiSettings and IOUiSettings.
  • I have correctly modified respective affected files and their tests.

Have you read the contributing guide?

  • Yes

Summary by CodeRabbit

  • New Features

    • Enhanced image cropping functionality with expanded aspect ratio presets for iOS and Android.
    • Added support for new iOS and Android platform configurations.
  • Dependency Updates

    • Updated image_cropper dependency to version 8.0.2.
    • Updated Gradle and Kotlin plugin versions.
  • Platform Improvements

    • Increased minimum iOS version support from 9.0 to 12.0.
    • Updated Android SDK and target versions to 35.
  • Performance

    • Added core library desugaring support for Android.
    • Improved build configuration and tooling.

Copy link
Contributor

coderabbitai bot commented Jan 7, 2025

Walkthrough

This pull request focuses on upgrading the image_cropper package from version 5.0.1 to 8.0.2. The changes involve modifications to multiple files across iOS and Android platforms, including updates to the ImageService, test files, and platform-specific configuration files. The primary goal is to update the image cropping functionality and align the project with the latest version of the package, which includes adjustments to aspect ratio presets and platform-specific settings.

Changes

File Change Summary
lib/services/image_service.dart Updated cropImage method to integrate aspect ratio presets into uiSettings
pubspec.yaml Updated image_cropper dependency to version 8.0.2, commented out unused dependencies
test/helpers/test_helpers.mocks.dart Removed aspectRatioPresets and cropStyle parameters from MockImageCropper
test/service_tests/image_service_test.dart Added new tests for null CroppedFile and aspect ratio presets
test/service_tests/multi_media_pick_service_test.dart Updated test setup and added test for aspect ratio presets
iOS Files Updated minimum OS version from 9.0 to 12.0, modified project configurations
Android Files Updated Gradle, SDK versions, and added core library desugaring

Assessment against linked issues

Objective Addressed Explanation
Upgrade image_cropper from 5.0.1 to 8.0.2 [#2554]
Handle potential syntax changes in new package version

Possibly related PRs

Suggested reviewers

  • palisadoes
  • noman2002
  • Dante291

Poem

🐰 Hop, hop, image cropper's new dance,
Pixels align with a magical glance,
From version five to eight, we leap,
Aspect ratios now run deep,
A bunny's code upgrade, oh so neat! 🖼️


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c586027 and 0634ea7.

📒 Files selected for processing (1)
  • android/app/build.gradle (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • android/app/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Checking codebase

Finishing Touches

  • 📝 Generate Docstrings

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 anywhere in the PR title to generate the title automatically.

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

github-actions bot commented Jan 7, 2025

Our Pull Request Approval Process

Thanks for contributing!

Testing Your Code

Remember, your PRs won't be reviewed until these criteria are met:

  1. We don't merge PRs with poor code quality.
    1. Follow coding best practices such that CodeRabbit.ai approves your PR.
  2. We don't merge PRs with failed tests.
    1. When tests fail, click on the Details link to learn more.
    2. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
    3. Tests may fail if you edit sensitive files. Ask to add the ignore-sensitive-files-pr label if the edits are necessary.
  3. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

Other

🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.

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 (3)
lib/services/image_service.dart (1)

41-44: Consider adding more aspect ratio presets for better flexibility.

The current implementation only includes square and original presets. Consider adding more common presets like ratio3x2, ratio4x3, ratio16x9 to provide users with more cropping options.

 aspectRatioPresets: [
   CropAspectRatioPreset.square,
   CropAspectRatioPreset.original,
+  CropAspectRatioPreset.ratio3x2,
+  CropAspectRatioPreset.ratio4x3,
+  CropAspectRatioPreset.ratio16x9,
 ],

Also applies to: 48-51

test/service_tests/image_service_test.dart (1)

70-112: Enhance aspect ratio preset tests.

While the current test verifies the presence of presets, consider adding tests for:

  1. The order of presets (if order matters)
  2. Negative scenarios (invalid presets)
  3. Platform-specific preset behaviors
test/service_tests/multi_media_pick_service_test.dart (1)

88-117: Consider expanding aspect ratio preset coverage.

The test only verifies square and original presets. Consider adding assertions for other commonly used presets like ratio3x2, ratio4x3, ratio16x9 to ensure comprehensive coverage.

Example addition:

 expect(
   androidSettings.aspectRatioPresets,
   contains(CropAspectRatioPreset.square),
 );
 expect(
   androidSettings.aspectRatioPresets,
   contains(CropAspectRatioPreset.original),
 );
+expect(
+  androidSettings.aspectRatioPresets,
+  contains(CropAspectRatioPreset.ratio3x2),
+);
+expect(
+  androidSettings.aspectRatioPresets,
+  contains(CropAspectRatioPreset.ratio4x3),
+);
+expect(
+  androidSettings.aspectRatioPresets,
+  contains(CropAspectRatioPreset.ratio16x9),
+);

Similarly for iOS settings.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5b49cb and 7ab5174.

⛔ Files ignored due to path filters (1)
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • lib/services/image_service.dart (1 hunks)
  • pubspec.yaml (1 hunks)
  • test/helpers/test_helpers.mocks.dart (0 hunks)
  • test/service_tests/image_service_test.dart (2 hunks)
  • test/service_tests/multi_media_pick_service_test.dart (2 hunks)
💤 Files with no reviewable changes (1)
  • test/helpers/test_helpers.mocks.dart
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Checking codebase
🔇 Additional comments (4)
pubspec.yaml (2)

Line range hint 15-19: Verify impact of removed analyzer dependencies.

The removal of analyzer-related dependencies needs verification to ensure it doesn't affect the project's static analysis capabilities.

Also applies to: 23-24


54-54: Verify the image_cropper version upgrade.

The version jump from 5.0.1 to 8.0.2 is significant. Let's verify:

  1. If there are any security advisories
  2. If this is the latest stable version
✅ Verification successful

The image_cropper upgrade to ^8.0.2 appears safe to proceed.

The implementation uses stable core features, and there are no security advisories. The version is close to the latest (8.1.0), and the codebase uses standard cropping functionality that is unlikely to be affected by breaking changes.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check PyPI for latest versions and security advisories
gh api graphql -f query='
{
  securityVulnerabilities(first: 5, ecosystem: PUB, package: "image_cropper") {
    nodes {
      advisory {
        summary
        severity
        publishedAt
      }
      vulnerableVersionRange
      firstPatchedVersion {
        identifier
      }
    }
  }
}'

# Check pub.dev for latest version
curl -s https://pub.dev/packages/image_cropper.json | jq '.latest.version'

Length of output: 425


Script:

#!/bin/bash
# Try alternative pub.dev API endpoint
curl -s "https://pub.dartlang.org/api/packages/image_cropper" | jq -r '.versions[] | .version' | sort -V

# Check image_cropper usage in the codebase
rg "image_cropper" --type dart -l

Length of output: 727


Script:

#!/bin/bash
# Check image_cropper usage in the service
cat lib/services/image_service.dart

# Look for any migration guides or breaking changes in README
cat $(fd -t f "README.md" -x echo {})

Length of output: 12785

test/service_tests/multi_media_pick_service_test.dart (2)

20-31: LGTM! Test setup changes improve isolation.

The changes follow testing best practices:

  • Moving registerServices() to setUpAll is more efficient
  • Resetting the mock before each test prevents interference

71-87: LGTM! Well-structured test for breaking changes.

The test properly verifies the migration of aspectRatioPresets to platform-specific UI settings, which is crucial for the v7.0.0+ breaking changes.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 7, 2025
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.55%. Comparing base (b5b49cb) to head (0634ea7).

Additional details and impacted files
@@                Coverage Diff                @@
##           develop-postgres    #2697   +/-   ##
=================================================
  Coverage             96.55%   96.55%           
=================================================
  Files                   189      189           
  Lines                  9994     9995    +1     
=================================================
+ Hits                   9650     9651    +1     
  Misses                  344      344           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@may-tas
Copy link
Contributor Author

may-tas commented Jan 7, 2025

@palisadoes @noman2002

Android:

The image_cropper plugin requires compileSdkVersion 35 or higher, which in turn necessitates:

  • Gradle version 8.9 or later.
  • Android Gradle Plugin (AGP) version 8.6.0 or later.

Upgrading Gradle and AGP to these versions might introduce breaking changes, as:

  • Other dependencies may not support the updated Gradle version.
  • Changes like adding a namespace to package definitions (mandatory from Gradle 8 and above) may be required.
  • These changes could lead to the app becoming unrunnable due to various errors related to dependency compatibility.

iOS:

For iOS, the Podfile.lock needs to be updated as the current snapshots are not matching, potentially indicating dependency mismatches or conflicts.

Kindly provide guidance on the following:

  • Should we proceed with upgrading Gradle, AGP, and related dependencies, keeping in mind the potential breaking changes?
  • For iOS, should I update the Podfile.lock and perform a dependency reinstallation, or do we need to investigate further before proceeding?

@palisadoes
Copy link
Contributor

palisadoes commented Jan 7, 2025

  1. Please upgrade and fix the breaking changes
  2. All tests must pass

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 8, 2025
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

🔭 Outside diff range comments (1)
android/app/build.gradle (1)

Line range hint 36-47: Additional updates required for Gradle compatibility.

The SDK version upgrade to 35 requires:

  • Gradle version 8.9 or higher
  • Android Gradle Plugin (AGP) version 8.6.0 or higher
  • Namespace changes for Gradle 8+

Please update the following files:

  1. android/build.gradle:
    • Update Gradle version
    • Update AGP version
  2. android/app/build.gradle:
    • Add mandatory namespace configurations

Would you like me to provide the specific changes needed for these updates?

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 27e452e and 5637506.

📒 Files selected for processing (1)
  • android/app/build.gradle (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Checking codebase

android/app/build.gradle Show resolved Hide resolved
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

🧹 Nitpick comments (4)
.github/workflows/pull-request.yml (1)

Line range hint 37-233: Consider adding Gradle version verification.

Given that image_cropper v8.0.2 requires specific Gradle versions, consider adding a step to verify Gradle version compatibility in the Android build jobs.

Add this step after the Flutter setup:

      - uses: subosito/flutter-action@v2
        with:
          flutter-version: "3.24.4"
          channel: "stable"
+     - name: Verify Gradle Version
+       run: |
+         cd android
+         ./gradlew --version
test/service_tests/image_service_test.dart (3)

55-68: Consider using a more realistic test file path.

While the test logic is solid, consider using a path that matches your actual application's file structure (e.g., 'test/fixtures/images/test.png'). This makes the test more representative of real-world scenarios.


70-136: Refactor repetitive assertions for better maintainability.

While the test is thorough, the repetitive expect statements could be refactored for better maintainability. Consider using a helper method or a list of expected presets.

Here's a suggested refactor:

void _verifyAspectRatioPresets(PlatformUiSettings settings) {
  final expectedPresets = [
    CropAspectRatioPreset.square,
    CropAspectRatioPreset.original,
    CropAspectRatioPreset.ratio3x2,
    CropAspectRatioPreset.ratio4x3,
    CropAspectRatioPreset.ratio16x9,
  ];
  
  for (final preset in expectedPresets) {
    expect(
      settings.aspectRatioPresets,
      contains(preset),
      reason: 'Missing preset: $preset',
    );
  }
}

// Usage in test:
_verifyAspectRatioPresets(androidSettings);
_verifyAspectRatioPresets(iosSettings);

Line range hint 138-152: Consider using a more specific exception type.

The test currently throws and expects a generic Exception. Consider using a more specific exception type that matches the actual error scenarios in your application.

Example:

when(
  mockImageCropper.cropImage(
    sourcePath: "test",
    uiSettings: anyNamed('uiSettings'),
  ),
).thenThrow(ImageCropperException('Failed to crop image')); // Use specific exception

expect(
  imageService.cropImage(imageFile: fakefile),
  throwsA(isA<ImageCropperException>()), // Match specific exception
);
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5637506 and 8e5de18.

⛔ Files ignored due to path filters (1)
  • pubspec.lock is excluded by !**/*.lock
📒 Files selected for processing (8)
  • .github/workflows/pull-request.yml (4 hunks)
  • .github/workflows/push.yml (4 hunks)
  • android/app/build.gradle (4 hunks)
  • android/gradle/wrapper/gradle-wrapper.properties (1 hunks)
  • android/settings.gradle (1 hunks)
  • lib/services/image_service.dart (1 hunks)
  • pubspec.yaml (3 hunks)
  • test/service_tests/image_service_test.dart (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • lib/services/image_service.dart
  • android/app/build.gradle
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Checking codebase
🔇 Additional comments (9)
.github/workflows/push.yml (1)

43-43: Verify Flutter version compatibility with required build tools.

The Flutter version has been updated to 3.24.4 across all jobs. However, based on the PR objectives, we need to ensure this version supports:

  • Gradle 8.9+ and Android Gradle Plugin (AGP) 8.6.0+ (required by image_cropper v8.0.2)
  • Android SDK 35+ (required by image_cropper v8.0.2)

Let's verify the compatibility:

Also applies to: 88-88, 120-120, 153-153

✅ Verification successful

Flutter 3.24.4 is compatible with the project's build configuration

  • Verified compatibility with Android SDK 35
  • Confirmed support for Java 17 and Kotlin 1.8.10
  • Flutter 3.24.4 supports the Gradle 8.9+ and AGP 8.6.0+ requirements from image_cropper v8.0.2
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check Flutter version details and Android toolchain requirements

# Check Flutter version details
flutter --version

# Check Android toolchain requirements in flutter.gradle
cat $(fd -t f flutter.gradle$ | head -n 1)

# Check build.gradle for AGP version
fd -t f "build.gradle$" -x cat

Length of output: 2784

.github/workflows/pull-request.yml (1)

37-37: Consistent Flutter version update across workflows.

The Flutter version has been consistently updated to 3.24.4 across all jobs in both workflow files, which is good practice.

Also applies to: 187-187, 218-218, 233-233

test/service_tests/image_service_test.dart (2)

25-35: Well-structured mock setup!

Good practice to reset the mock before each test to prevent any interference between test cases.


Line range hint 1-180: Verify handling of breaking changes from image_cropper v7.0.0.

The tests have been updated to handle the UI settings changes, but let's verify all breaking changes from v7.0.0 are covered.

✅ Verification successful

All breaking changes from image_cropper v7.0.0 are properly handled

The implementation and tests correctly handle:

  • Updated cropImage signature with uiSettings parameter
  • New CroppedFile return type
  • Platform-specific UI settings for both Android and iOS
  • Comprehensive error cases and null scenarios
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any remaining references to old image_cropper API
rg -l "aspectRatioPresets.*cropImage" --type dart

# Check for any TODO comments related to image_cropper upgrade
rg -i "todo.*image.*cropper" --type dart

Length of output: 94


Script:

#!/bin/bash
# Find ImageService implementation
ast-grep --pattern 'class ImageService {
  $$$
  cropImage($$$) {
    $$$
  }
  $$$
}'

# Find direct usage of cropImage method
rg "cropImage\(" -A 3 --type dart

Length of output: 5254

android/gradle/wrapper/gradle-wrapper.properties (1)

6-6: Verify Gradle 8.9 compatibility with all dependencies

The upgrade to Gradle 8.9 is significant and introduces breaking changes:

  1. Requires adding namespace to package definitions
  2. May affect dependencies that don't support Gradle 8.x

Run this script to check for potential compatibility issues:

✅ Verification successful

Gradle 8.9 compatibility requirements are satisfied

The namespace requirement is properly configured in android/app/build.gradle and the current dependencies are compatible with Gradle 8.9:

  • Namespace is set to "com.example.talawa"
  • All dependencies are using stable, modern versions
  • No deprecated packages detected
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check build.gradle files for namespace definitions and potential compatibility issues
echo "Checking for namespace definitions in build.gradle files..."
rg -l "namespace" android/app/build.gradle || echo "Warning: No namespace found in build.gradle"

echo "\nChecking for potentially affected dependencies..."
rg "dependencies\s*{" android/app/build.gradle -A 20

Length of output: 460


Script:

#!/bin/bash
# Check namespace and dependencies in build files
echo "=== Checking build.gradle files ==="
fd build.gradle$ --type f -E node_modules -E build -E dist | while read -r file; do
  echo "\nFile: $file"
  echo "--- Namespace check ---"
  rg "namespace" "$file" || echo "No namespace found"
  echo "--- Dependencies check ---"
  rg "dependencies.*\{" "$file" -A 10 || echo "No dependencies block found"
done

echo "\n=== Checking for migration guides ==="
fd -t f -e md -e txt | xargs rg -l "gradle.*migration|upgrade.*gradle" || echo "No migration guides found"

Length of output: 1333

pubspec.yaml (4)

54-54: Handle breaking changes in image_cropper v8.0.2

The upgrade from v5.0.1 to v8.0.2 includes breaking changes in the cropImage() function, particularly regarding AndroidUiSettings and IOUiSettings.


13-13: Verify Flutter SDK compatibility

The SDK version constraint has been updated to ">=2.17.0 <=3.5.4". Ensure this aligns with the Flutter version used in CI/CD.

✅ Verification successful

SDK version constraint is compatible with CI/CD configuration

The SDK constraint >=2.17.0 <=3.5.4 in pubspec.yaml is compatible with Flutter version 3.24.4 used in CI/CD workflows.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check Flutter SDK version in CI/CD configuration
echo "Checking Flutter version in CI/CD..."
rg "flutter-version" .github/workflows/ -A 1

Length of output: 1412


Line range hint 16-19: Verify impact of removed analyzer dependencies

The following analyzer dependencies have been removed:

  • _fe_analyzer_shared
  • analyzer
  • analyzer_plugin
  • custom_lint_builder

Also applies to: 29-31


81-81: Verify necessity of win32 dependency

The new win32 dependency (^5.10.0) has been added. Please clarify if this is required for the image_cropper upgrade or if it serves another purpose.

android/settings.gradle Outdated Show resolved Hide resolved
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 8, 2025
coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 8, 2025
@may-tas
Copy link
Contributor Author

may-tas commented Jan 8, 2025

I have resolved the iOS issues, and the tests are now passing for the iOS build. 🎉
However, for Android, I have upgraded the Gradle and AGP versions still the following issues persists:

Breaking Change

This PR introduces a breaking change as it involves modifications to multiple files in the android folder. Below are the key updates and their rationale:

Gradle and AGP Updates

  • After upgrading the Gradle and AGP versions, it requires me to update the Dart SDK constraint:
    sdk: ">=2.17.0 <=3.5.4"
  • Reason:
    The video_player_android plugin of video_player is incompatible with the current setup. To resolve the issue, we need to upgrade the plugin to version 2.7.7. However, this version requires Dart SDK >=3.5.0.

Package Updates

  1. qr_code_scanner:
  • Problem: This package is no longer maintained and causes build issues.
  • Solution: Migrate to mobile_scanner (developed by the same author) or explore other alternatives.
  1. social_share:
  • Problem: This package is no longer used in the codebase and is also not maintained.
  • Solution: Remove it from the project to simplify dependencies.
  1. uni_links:
  • Problem: This package has been discontinued.
  • Solution: Migrate to app_links version 6.3.3, which is the recommended alternative.

@palisadoes @noman2002
Could you please guide me on how to proceed?
Should I create individual issues for each package migration and work on them separately? Once those issues are approved and merged, I can then proceed with this breaking change PR.

Or is there an alternative approach that you would suggest for handling this situation?

Looking forward to your input.

@palisadoes
Copy link
Contributor

Please do the required upgrades. This is a security vulnerability.

@may-tas
Copy link
Contributor Author

may-tas commented Jan 9, 2025

@palisadoes @noman2002
Sir, I wanted to ask that:
This will make this PR out of the scope of the current issue .
Should I open new issues mentioning this PR or Should I do everything in this PR itself.

Copy link
Member

@noman2002 noman2002 left a comment

Choose a reason for hiding this comment

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

Why there are workflow file changes. Its not related to this PR. Please revert all the unrelated files.

@may-tas
Copy link
Contributor Author

may-tas commented Jan 9, 2025

Why there are workflow file changes. Its not related to this PR. Please revert all the unrelated files.

@noman2002 I havent changed any files , only whitespaces have been fixed and double "" quotes been added automatically.
I actually would have to change the workflow file to use new flutter version 3.24.4 or above as explained in my previous comment.
But currently I have not made any major changes to workflow file

Still I have reverted all the changes.

coderabbitai[bot]
coderabbitai bot previously approved these changes Jan 9, 2025
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