Third-party Dart packages
There are two types of third-party dependencies in the Fuchsia tree:
- Extracted from pub.
- Synced from Git.
Pub dependencies
Pub dependencies are hosted at //third-party/dart-pkg. That project
is regularly kept up-to-date with [a script][dart-3p-script] that relies on the
pub tool to resolve versions and fetch sources for the packages that are used
in the tree.
This script uses a set of canonical local packages, which are assumed to be
providing the necessary package coverage for the entire tree.
Additionally, projects may request third-party dependencies to be imported through the following procedure:
- Locate the
dart_dependencies.yamlfile in //src/dart. - In
dart_dependencies.yaml, append the desired dependencies to 'dependencies':
- Run this script:
- Merge your changes to
dart_dependencies.yamlto main. - Merge the files, downloaded by running the
update_3p_packages.pyscript, to main. - In the
//integration/fuchsia/third_party/dartmanifest, update the project nodethird_part/dart-pkgrevision attribute with the SHA from your commit ofdart_dependencies.yaml.. - Merge your change to the
//integration/fuchsia/third_party/dartmanifest file to main.
最后更新:
2022 年 12 月 31 日(Saturday) 21:06 CST