-
Notifications
You must be signed in to change notification settings - Fork 226
request: handle flavor dependency overrides #800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
How do you suggest that this config would look like? |
Maybe a possible approach for handling dependency overrides per flavor in Melos could be adding a For example: flavors:
lite:
overrides:
ads_sdk:
path: ../libs/ads_stub
analytics:
name: analytics_lite
version: ^2.0.0
pro:
overrides:
ads_sdk:
path: ../libs/real_ads
analytics:
name: analytics_pro
version: ^3.0.0 Running Does this approach make sense and seem feasible to implement? |
The pubspec_overrides are no longer being used by Melos from v7, since it relies on pub workspaces now. Since we haven't heard anyone else requesting this I don't think it'll be anything that we'd implement directly in Melos, but I believe you'd be able to do this yourself by writing a pre-bootstrap hook script that does this. |
Just read the original flutter issue again, it does indeed seem to be a demand for it, so I'll keep the issue open. |
Is there an existing feature request for this?
Command
melos bootstrap --flavor [flavorName]
Description
As a developer, I would like to override some dependencies thanks to the
pubspec_overrides.yaml
files.Given some declarations in
melos.yaml
or in localpubspec.yaml
files, running the bootstrap command would generate the right overrides.Reasoning
It would tackle some issues created in the flutter project (flutter/flutter#46979).
I think
melos
could be the right place for such feature as it is the go-to tool for managing monorepos and local dependencies.Additional context and comments
No response
The text was updated successfully, but these errors were encountered: