Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

[shared_preferences] Fixes gradle version for shared preferences (macos, web) bug on android #2470

Merged
merged 3 commits into from Jan 21, 2020

Conversation

luanpotter
Copy link
Contributor

Description

Fixes gradle version for shared preferences (macos, web) bug on android

For some reason the version of gradle inside the android folders of the "sub packages" is different than the real one on the real shared_preferences plugin.

Even though my project only depends on the main package, I get an error when I try to run it:

FAILURE: Build failed with an exception.

* Where:
Build file '<...>/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+2/android/build.gradle' line: 22

* What went wrong:
A problem occurred evaluating root project 'shared_preferences_web'.
> Failed to apply plugin [id 'com.android.library']
   > Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in <...>/flutter/.pub-cache/hosted/pub.dartlang.org/shared_preferences_web-0.1.2+2/android/gradle/wrapper/gradle-wrapper.properties to gradle-5.4.1-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s

The plugin shared_preferences_web could not be built due to the issue above.

And the same for macos.

Related Issues

See related issue on stackoverflow: https://stackoverflow.com/questions/59468295/failure-build-failed-with-an-exception-shared-preference-and-gradle-wrapper-pr

Checklist

Most of the checklist does not apply because it's just a version bump (no need to write tests for that, for example).

Breaking Change

Does your PR require plugin users to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (please indicate a breaking change in CHANGELOG.md and increment major revision).
  • No, this is not a breaking change.

@amirh
Copy link
Contributor

amirh commented Jan 17, 2020

Thanks, please bump the patch version for both packages and add a changelog entry

@luanpotter
Copy link
Contributor Author

@amirh just did, please let me know if I did something wrong :)

@luanpotter luanpotter requested a review from amirh January 18, 2020 01:36
@amirh
Copy link
Contributor

amirh commented Jan 18, 2020

I think the presubmit failure was fixed on master, can you rebase?

@luanpotter
Copy link
Contributor Author

@amirh sure!

@luanpotter
Copy link
Contributor Author

@amirh I have rebased master but the check still failed... Not sure how to get more details on that...

@amirh
Copy link
Contributor

amirh commented Jan 21, 2020

Looks like current failure is a CI "Agent is not responding!", I re-kicked the task.

@amirh amirh merged commit 1d56393 into flutter:master Jan 21, 2020
FlutterSu pushed a commit to FlutterSu/flutter-plugins that referenced this pull request Nov 20, 2020
…os, web) bug on android (flutter#2470)

For some reason the version of gradle inside the android folders of the "sub packages" is different than the real one on the real shared_preferences plugin.

Even though my project only depends on the main package, I get an error when I try to run it:
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants