|
| 1 | +# This file represents a "workspace" that applies to the whole repository. |
| 2 | +# |
| 3 | +# See <https://flutter.dev/go/pub-workspace> for details. |
| 4 | +# |
| 5 | +# The `flutter/engine` repository is a quasi-monorepo, with multiple Dart tools |
| 6 | +# and packages that are all interdependent. Third party dependencies are managed |
| 7 | +# by the `DEPS` file in the root of the repository, and are synced to either the |
| 8 | +# `third_party` (i.e. `//flutter/third_party`) or `../third_party` (i.e. |
| 9 | +# `//third_party`) directories by `gclient sync`. |
| 10 | +# |
| 11 | +# Every dependency declared here are dependencies used by _one or more_ of the |
| 12 | +# packages in the repository (though there is no enforcement of this). This file |
| 13 | +# then generates a `.dart_tool/package_config.json` file that is used by the |
| 14 | +# rest of the repository to resolve dependencies. |
| 15 | +# |
| 16 | +# ============================================================================== |
| 17 | +# WORKFLOWS |
| 18 | +# ============================================================================== |
| 19 | +# |
| 20 | +# ------------------------------------------------------------------------------ |
| 21 | +# (1) ADDING A NEW DEPENDENCY |
| 22 | +# ------------------------------------------------------------------------------ |
| 23 | +# Dependencies need to be added either via the DEPS file, or by checking if they |
| 24 | +# are available in the vendored Dart SDK (see notes below on library locations). |
| 25 | +# If dependencies are available, see (4) for how to add dependencies to a package in the workspace. |
| 26 | +# |
| 27 | +# ------------------------------------------------------------------------------ |
| 28 | +# (2) CREATING A NEW PACKAGE |
| 29 | +# ------------------------------------------------------------------------------ |
| 30 | +# If creating a package, say in ./tools or ./tools/pkg, ensure the following |
| 31 | +# header in its respective `pubspec.yaml`: |
| 32 | +# ``` |
| 33 | +# # We don't publish packages to pub.dev from the engine repository. |
| 34 | +# publish_to: none |
| 35 | +# |
| 36 | +# # Required for workspace support. |
| 37 | +# environment: |
| 38 | +# sdk: ^3.5.0-294.0.dev |
| 39 | +# |
| 40 | +# # This package is managed as part of the engine workspace. |
| 41 | +# resolution: workspace |
| 42 | +# ``` |
| 43 | +# |
| 44 | +# See (4) for how to add dependencies to a package in the workspace. |
| 45 | +# |
| 46 | +# ------------------------------------------------------------------------------ |
| 47 | +# (3) MIGRATING A NON-WORKSPACE PACKAGE TO USING THE WORKSPACE |
| 48 | +# ------------------------------------------------------------------------------ |
| 49 | +# Many packages in this repo are still using a pre-workspace style pubspec.yaml, |
| 50 | +# either with manually declared `dependency_overrides` (much of ./tools) or by |
| 51 | +# using pub (./web_sdk, ./lib/web_ui). To migrate a package to the workspace: |
| 52 | +# |
| 53 | +# A. Add the `resolution: workspace` field to the pubspec.yaml. |
| 54 | +# B. Update the minimum SDK version to at least `^3.5.0-294.0.dev`. |
| 55 | +# C. Add the package to the `workspace` field in this file. |
| 56 | +# D. Ensure every dependency in the package is added to the `dependencies` field |
| 57 | +# in this file, following instructions in (4). |
| 58 | +# |
| 59 | +# Once `dart pub get` is run on the workspace, the package will be resolved as |
| 60 | +# part of the workspace, and the `dependency_overrides` in this file will be |
| 61 | +# applied to the package. |
| 62 | +# |
| 63 | +# ------------------------------------------------------------------------------ |
| 64 | +# (4) ADDING DEPENDENCIES TO A PACKAGE IN THIS WORKSPACE |
| 65 | +# ------------------------------------------------------------------------------ |
| 66 | +# When adding a dependency to a package in the workspace, add the dependency to |
| 67 | +# the `dependencies` field in this file. If the dependency is located within |
| 68 | +# the repository, use the `path` field to point to the package. |
| 69 | +# |
| 70 | +# If the dependency is a third party package, add it to the |
| 71 | +# `dependency_overrides` field in this file. The `any` version constraint is |
| 72 | +# used to indicate that the version of the package is not important, as it is |
| 73 | +# managed by the `DEPS` file. |
| 74 | + |
| 75 | +name: _engine_workspace |
| 76 | + |
| 77 | +# Required for workspace support. |
| 78 | +environment: |
| 79 | + sdk: ^3.5.0-294.0.dev |
| 80 | + |
| 81 | +# Declare all packages that are part of the workspace. |
| 82 | +workspace: |
| 83 | + - tools/engine_tool |
| 84 | + |
| 85 | +# Declare all dependencies that are used by one or more packages. |
| 86 | +# |
| 87 | +# A few notes: |
| 88 | +# 1. There is no distinction between "dependencies" and "dev_dependencies"; |
| 89 | +# those notions are for *publishing* packages, not for managing a workspace. |
| 90 | +# Specific packages in the workspace itself will declare whether they are |
| 91 | +# dependencies or dev_dependencies, but here it is a union of both. |
| 92 | +# |
| 93 | +# 2. The `any` version constraint is used to indicate that the version of the |
| 94 | +# package is not important, as it is managed by the `DEPS` file. In other |
| 95 | +# words, "if the test pass, ship it". |
| 96 | +# |
| 97 | +# While not enforced by tooling, try to keep this list in alphabetical order. |
| 98 | +# TODO(matanlurey): https://dart.dev/tools/linter-rules/sort_pub_dependencies. |
| 99 | +dependencies: |
| 100 | + args: any |
| 101 | + async_helper: any |
| 102 | + expect: any |
| 103 | + file: any |
| 104 | + logging: any |
| 105 | + meta: any |
| 106 | + path: any |
| 107 | + platform: any |
| 108 | + process_runner: any |
| 109 | + smith: any |
| 110 | + |
| 111 | +# Instructs pub on how to resolve the dependencies that are part of "DEPS". |
| 112 | +# |
| 113 | +# For historic reasons, there are ~3 or so places packages might be located: |
| 114 | +# |
| 115 | +# - `./third_party/pkg/{name}`: for packages vended directly as part of "DEPS". |
| 116 | +# Usually these are Flutter engine specific packages, i.e. they did not exist |
| 117 | +# in the Dart vended SDK (the other options below). Typically these originate |
| 118 | +# from pub (https://pub.dev) and are mirrored into a Google Git repository: |
| 119 | +# <https://flutter.googlesource.com/>. |
| 120 | +# |
| 121 | +# - `./third_party/dart/pkg/{name}`: for packages that lives *in* the Dart SDK, |
| 122 | +# which is in turn vendored into the Flutter engine repository. You can see |
| 123 | +# a full list of available packages here: |
| 124 | +# <https://github.com/dart-lang/sdk/tree/main/pkg>. |
| 125 | +# |
| 126 | +# - `./third_party/dart/third_party/pkg/{name}`: for packages that are vendored |
| 127 | +# into the Dart SDK from pub.dev. These are often first-party packages from |
| 128 | +# the Dart team, but not part of the Dart SDK itself. You can see a full list |
| 129 | +# of available packages here: |
| 130 | +# <https://github.com/dart-lang/sdk/blob/main/DEPS>. |
| 131 | +dependency_overrides: |
| 132 | + args: |
| 133 | + path: ./third_party/dart/third_party/pkg/args |
| 134 | + async: |
| 135 | + path: ./third_party/dart/third_party/pkg/async |
| 136 | + async_helper: |
| 137 | + path: ./third_party/dart/pkg/async_helper |
| 138 | + collection: |
| 139 | + path: ./third_party/dart/third_party/pkg/collection |
| 140 | + engine_build_configs: |
| 141 | + path: ./tools/pkg/engine_build_configs |
| 142 | + engine_repo_tools: |
| 143 | + path: ./tools/pkg/engine_repo_tools |
| 144 | + expect: |
| 145 | + path: ./third_party/dart/pkg/expect |
| 146 | + file: |
| 147 | + path: ./third_party/dart/third_party/pkg/file/packages/file |
| 148 | + litetest: |
| 149 | + path: ./testing/litetest |
| 150 | + logging: |
| 151 | + path: ./third_party/dart/third_party/pkg/logging |
| 152 | + meta: |
| 153 | + path: ./third_party/dart/pkg/meta |
| 154 | + path: |
| 155 | + path: ./third_party/dart/third_party/pkg/path |
| 156 | + platform: |
| 157 | + path: ./third_party/pkg/platform |
| 158 | + process: |
| 159 | + path: ./third_party/pkg/process |
| 160 | + process_fakes: |
| 161 | + path: ./tools/pkg/process_fakes |
| 162 | + process_runner: |
| 163 | + path: ./third_party/pkg/process_runner |
| 164 | + smith: |
| 165 | + path: ./third_party/dart/pkg/smith |
| 166 | + source_span: |
| 167 | + path: ./third_party/dart/third_party/pkg/source_span |
| 168 | + string_scanner: |
| 169 | + path: ./third_party/dart/third_party/pkg/string_scanner |
| 170 | + term_glyph: |
| 171 | + path: ./third_party/dart/third_party/pkg/term_glyph |
| 172 | + yaml: |
| 173 | + path: ./third_party/dart/third_party/pkg/yaml |
0 commit comments