Flutter Monorepo Build Tools
flutter pub get flutter_monorepo_build_tools
monorepo.sample.yamlfor an example of how to configure
Monorepo Build Tool
dart run flutter_monorepo_build_tools:monorepo_build_tool
Re-run the tool whenever you add, rename, or remove a local package or if local package dependencies change.
You can provide the following flags/options to modify the behavior of the monorepo build tool:
|Enables printing logs.
OOTB CI Support
At release, FMBT only contains out-of-the-box support for CircleCI using the
To configure your monorepo:
- Create a source folder to contain your raw CircleCI config. This should include one
config.ymlfile and as many
continue-config.ymltype files as you wish.
config.ymlshould look something like this:
# this allows you to use CircleCI's dynamic configuration feature
# the path-filtering orb is required to continue a pipeline based on
# the path of an updated fileset
# the always-run workflow is always triggered, regardless of the pipeline parameters.
# the path-filtering/filter job determines which pipeline
# parameters to update.
# the mapping key will be automatically generated by flutter_monorepo_build_tools
# this is the path of the configuration we should trigger once
# path filtering and pipeline parameter value updates are
- Create however many
continue-config.ymltype files you need for your use case. It is important when naming workflows that they contain the name of your entrypoint directory. For example, if your workflow is related to an app
app, it should be named something like
app_deploy. For a full list of matching globs, see
Single quotation marks in values must be escaped
Some string values are wrapped with single quotation marks in the output even when they are not
in the source. We believe this is due to
json2yaml, which this package uses. It is unclear
at this point whether it is possible to overcome this. We recommend that you run this tool on
your existing configuration and validate the output before committing to this tool.
If you have a line like this:
- run: echo 'export PATH="$PATH:`pwd`/flutter/bin"' \>> $BASH_ENV
then you will need to escape the single quotes by prepending them with an additional single quote, like so:
- run: echo ''export PATH="$PATH:`pwd`/flutter/bin"'' \>> $BASH_ENV
It is important that you do not wrap such a value in single quotes, e.g.
# DO NOT DO THIS
- run: 'echo: ''something'''
# DO THIS INSTEAD
- run: echo ''something''
This will result in your output having unescaped single quotation marks, causing the overall config to be become impossible to parse.