With related packages we recommend that you use a git mono repo.
This ensures consistent naming and paths between between the related packages.
Pubspec.yaml - dependency_overrides
Within your mono repo we recommend that you commit you pubspec.yaml with a dependency_overrides section listing the relative paths of each of the dependant packages.
1
name: conduit
2
dependencies:
3
conduit_orm: ^1.0.0
4
conduit_common: ^1.0.0
5
6
dependency_overrides:
7
conduit_orm:
8
path: ../orm
9
conduit_common:
10
path: ../common
Copied!
The dependency overrides ensures that when anyone clones your project the code will work correctly out of the box.
Of course pub.dev will not let you publish a package with a path based dependency override.
Pub Release manages your dependency overrides and will temporarily remove them during the release process so your packages can be published.