WalletConnect / Web3ModalFlutter

The Web3Modal for WalletConnect built using Flutter.
https://pub.dev/packages/web3modal_flutter
Apache License 2.0
44 stars 44 forks source link

coinbase_wallet_sdk Dependency and AGP 8.x Compatibility #168

Closed 4ICTOTA closed 2 months ago

4ICTOTA commented 2 months ago

I'm using web3modal_flutter in my Flutter project, and I've encountered an issue when attempting to build the project with Android Gradle Plugin (AGP) version 8.x. The problem stems from the coinbase_wallet_sdk dependency, which is pulled in automatically as a transitive dependency.

The coinbase_wallet_sdk causes a build failure because it lacks a namespace entry in its build.gradle file, which is required for compatibility with AGP 8.x. This issue prevents me from using the latest Android Gradle Plugin, which I need for other dependencies and tools in my project.

Steps to Reproduce:

Add web3modal_flutter as a dependency in a Flutter project. Use Android Gradle Plugin version 8.x in the build.gradle file. Attempt to build the project. Expected Behavior:

The project should build successfully with Android Gradle Plugin 8.x without any issues related to the coinbase_wallet_sdk dependency.

Actual Behavior:

The build fails with an error stating that namespace is not specified in the coinbase_wallet_sdk module's build.gradle file.

Environment:

Flutter SDK: 3.24.1 Dart SDK: 3.5.1 Android Gradle Plugin: 8.x web3modal_flutter version: 3.3.3 Kotlin version: 2.0.20 Additional Context:

This issue could potentially be resolved by making the coinbase_wallet_sdk an optional dependency or by updating it to be compatible with the latest AGP requirements. Any assistance or guidance on how to proceed would be greatly appreciated.

quetool commented 2 months ago

Hello @4ICTOTA! Thanks for the report, I'll share it with Coinbase team. This is related to this one https://github.com/WalletConnect/Web3ModalFlutter/issues/162

quetool commented 2 months ago

Could you try adding this in your pubsepc?

dependency_overrides:
  coinbase_wallet_sdk:
    git:
      url: https://github.com/WalletConnect/wallet-mobile-sdk.git
      path: flutter
      ref: beba5b377e32554f5c00ee08c4df509d9078dbf1
4ICTOTA commented 2 months ago

Thanks a lot! Added it to my pubspec.yaml, and it's working great. Much appreciated! +rep

quetool commented 2 months ago

Thanks for confirming @4ICTOTA! I opened a PR to Coinbase team in regards of this https://github.com/MobileWalletProtocol/wallet-mobile-sdk/pull/357