Skip to content

Commit 5350b70

Browse files
committed
Document first-plugin stub creation
1 parent a775b94 commit 5350b70

1 file changed

Lines changed: 25 additions & 4 deletions

File tree

QUICKSTART.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,31 @@ export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/<your 28+ version>"
8585
`flutter pub get` is required before the first Bazel build and after every pub
8686
change. It creates `.dart_tool/package_config.json`, which the Dart compiler
8787
uses; it also refreshes `.flutter-plugins-dependencies` and Flutter's Android
88-
registrant when a plugin graph exists. `.dart_tool` is bootstrap state rather
89-
than a tracked input. For the first plugin graph, create the two zero-byte
90-
placeholder files by hand before evaluation; this bootstrap path has no automated
91-
regression gate.
88+
`GeneratedPluginRegistrant.java` when a plugin graph exists. `.dart_tool` is
89+
bootstrap state rather than a tracked input.
90+
91+
For the first plugin graph, Bazel also needs two committed generated-state files
92+
to exist before their updater targets can run. They are not both plugin
93+
registrants: `plugin_deps.MODULE.bazel` is the generated Maven dependency
94+
segment, while `lib/dart_plugin_registrant.dart` is the Dart registrant. From a
95+
root-app module, create the zero-byte placeholders without overwriting existing
96+
generated files:
97+
98+
```sh
99+
test -e plugin_deps.MODULE.bazel || touch plugin_deps.MODULE.bazel
100+
test -e lib/dart_plugin_registrant.dart || touch lib/dart_plugin_registrant.dart
101+
```
102+
103+
For the documented monorepo layout, run this from the module root instead:
104+
105+
```sh
106+
test -e plugin_deps.MODULE.bazel || touch plugin_deps.MODULE.bazel
107+
test -e packages/host_app/lib/dart_plugin_registrant.dart || \
108+
touch packages/host_app/lib/dart_plugin_registrant.dart
109+
```
110+
111+
The root-app and monorepo walkthroughs below give the corresponding updater
112+
commands. This first-plugin bootstrap path has no automated regression gate.
92113

93114
Until `rules_flutter` is published to the Bazel Central Registry, create a
94115
consumer as a sibling of a checkout and retain a development override:

0 commit comments

Comments
 (0)