Comments (7)
Do we want to support overriding commands like this, or would it be better to just bake support for flutter into the mono_repo tool?
I.e., if your pubspec specified the flutter sdk, then we would always run flutter packages get
instead of pub get
from mono_repo.dart.
I think we should have both.
This issue is more about customizing.
Who knows, maybe you want a project to specify some custom arguments such as
--[no-]packages-dir
The fact that it helps with flutter support is just a side-effect
from mono_repo.dart.
Pull requests welcome!
from mono_repo.dart.
I'm trying to address this issue, in the way suggested by @alorenzen. In the pub
method in tool/ci.sh
I now check (grep) for sdk: flutter
and if so, call flutter
instead of pub
.
This does of course require the user to install flutter, which I'm currently doing in a before_script
in my mono_repo.yaml
config.
I'll open a pull request for this asap.
from mono_repo.dart.
@BenVercammen Could you share a full example of how you are currently using mono_repo with flutter?
That would be very helpful, 😁
from mono_repo.dart.
@BenVercammen Could you share a full example of how you are currently using mono_repo with flutter?
So, my set up is nothing special:
- /dart_package_1
- mono_pkg.yaml
- /dart_package_2
- mono_pkg.yaml
- /flutter_package
- mono_pkg.yaml
- /mono_repo.yaml
In the root folder of my project, I use the default mono_repo commands:
mono_repo pub get
for dependenciesmono_repo generate
to generate travis/CI script
There's really nothing special to it, I guess...
I do have a "trick" in order to make this work on Travis CI, in the before_script
in my mono_repo.yaml file:
self_validate: analyzer_and_format
travis:
branches:
- master
- develop
before_script:
- git clone https://github.com/flutter/flutter.git ${TRAVIS_HOME}/flutter-sdk -b master
- export FLUTTER_SDK="${TRAVIS_HOME}/flutter-sdk"
- export PATH="$FLUTTER_SDK/bin:$PATH"
- export NO_PROXY=localhost,127.0.0.1
- flutter doctor
after_failure:
- tool/report_failure.sh
merge_stages:
- analyzer_and_format
- ensure_build
- unit_test
This script is taking care of setting up flutter on Travis CI before running the other scripts. Otherwise, my fix to call flutter pub get
in stead of pub get
will fail because flutter is not present.
I guess there is still some work to do if you also want to run flutter (integration) tests on Travis CI. However, for now this is enough for me. I'll probably also switch to codemagic in a while, as it is supposed to have better (out of the box?) support for testing and deploying flutter apps.
Hope this helps...
PS: of course, you'll need to have the latest release installed (4.0.0) for this to work.
from mono_repo.dart.
I see, thanks a lot :D
I am using github actions, so I do not have the option to define a before_script
. not sure if there is an equivalent.
Besides that the Github Actions generated, execute:
run: pub upgrade --no-precompile
which fails ofc for my flutter app.
It should probably execute mono_repo pub
instead.
Seems that is not happening in travis.
from mono_repo.dart.
Related Issues (20)
- Request for tips: how to handle product life cycle with mono_repo? HOT 1
- "dart.bat" file not found (anymore) HOT 3
- Generate .github/dependabot.yaml HOT 1
- Flutter Support in Github Actions HOT 8
- Pin hashes for dependencies HOT 14
- Found 1 file excluded from sound null safety
- Allow integration with melos HOT 7
- Flutter package determination HOT 4
- The save-state command is deprecated and will be disabled soon HOT 3
- Option to generate workflow files for automated publishing HOT 1
- add support for dart format
- execution stats for all modules
- option to declare mono_repo support in pubspec.yaml
- add a mono_repo.yaml option to not generate the self-check HOT 4
- Add `concurrency` option for Github actions HOT 1
- update mono_repo so that it can work with dependabot HOT 3
- Support only running jobs for affected packages HOT 3
- Add a way to specify dependency versions for all packages in mono_repo.yaml. HOT 3
- Add a `fix` command to run `dart fix` across all packages HOT 2
- Support wildcard (`major.minor`) SDK version specifiers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mono_repo.dart.