flutter_architecture_samples icon indicating copy to clipboard operation
flutter_architecture_samples copied to clipboard

Run flutter packages get for all the projects.

Open feinstein opened this issue 5 years ago • 15 comments

I don't know if this is even possible, but it will be nice to have a way to run flutter packages get only once and have all the projects dependencies satisfied at once.

feinstein avatar Feb 21 '19 23:02 feinstein

There's a script for that:

scripts/ci.sh --get

mmcc007 avatar Feb 22 '19 03:02 mmcc007

Interesting, this should be on the Readme.md (if it is I missed it completely)

feinstein avatar Feb 22 '19 03:02 feinstein

Well, I suppose it was not anticipated it would come up... but now that you mention it.. it should probably be in there.

mmcc007 avatar Feb 22 '19 05:02 mmcc007

Hello,

I am trying to run this script on Windows 10 and I am getting the following error:

Cannot read link, path = [folder name] (OS Error: The file or directory is not a reparse point. , errno = 4390) Running "flutter pub get" in redux... pub get failed (66; , errno = 4390))

After digging around a bit the problem seems to be with the pubspec.yaml referencing other parts of the app and Windows (or flutter ?) not been able to complete the task or fine the path(?).

I've also tried running flutter package get in individual folders and the problem repeats in the ones that have reference in other folders in the pubspec.yaml.

Can you please provide some assistance as to how I can run the project on Windows 10?

Thank you very much

george2seven avatar Jan 29 '20 10:01 george2seven

Oh boy, sorry about that @george2seven -- I'll admit I never use Windows and kinda assumed the Flutter / Dart tools would handle / vs \ in yaml files properly for us :/

I'll rig up my Windows 10 gaming machine with a Flutter environment to see if I can get this one fixed up. Thanks for reporting :)

brianegan avatar Jan 29 '20 11:01 brianegan

Thank you very much @brianegan !

george2seven avatar Jan 29 '20 12:01 george2seven

what is the status of this?

ride4sun avatar May 23 '20 23:05 ride4sun

The Flutter tool has something similar for getting all the dependencies of all the Flutter git main repo, maybe this can be adapted? I never tried, but maybe it's compatible?

feinstein avatar May 23 '20 23:05 feinstein

@feinstein can you elaborate?

ride4sun avatar May 27 '20 22:05 ride4sun

Check the Flutter repo for "Contributing", there they explain how to setup your environment, download the code and etc. One of the steps is to use the Flutter tool to fetch all the dependencies of all the inner projects with their respectives YAML. I at my phone right now, otherwise I would point it out. If you can't find it, please let me know.

feinstein avatar May 27 '20 22:05 feinstein

Sorry looked into the repos. but could not find what you are talking about.

ride4sun avatar May 29 '20 22:05 ride4sun

Take a look at here, it makes a reference to:

flutter update-packages

feinstein avatar May 30 '20 23:05 feinstein

This is a very useful script! I personally have multiple packages in my own project, and this script helps me to bulk flutter pub get :)

fzyzcjy avatar Apr 10 '21 01:04 fzyzcjy

I made https://pub.dev/packages/puby which works in all flutter/dart projects and mono-repos

Rexios80 avatar Feb 25 '22 00:02 Rexios80

@Rexios80 nice script. I wonder if someone create a plugin for android studio

NikitaRomanenko avatar Jul 10 '22 18:07 NikitaRomanenko