[flutter_tools] generate a synthetic flutter_gen package on pub get (#61261)

Allow configuring the flutter_manifest to support a synthetic package, this is done through flutter: generate: true.

When running pub get, insert a flutter_gen entry into the packages if it does not already exist. This points to .dart_tool/flutter_gen, which can be updated to contain the generated intl sources (But doesn't currently)

Adds an integration test that verifies this code can be run and imported when enabled.

Part of #60914
This commit is contained in:
Jonah Williams
2020-07-15 10:12:52 -07:00
committed by GitHub
parent 3631adc99a
commit d8b6fa153a
23 changed files with 254 additions and 25 deletions

View File

@@ -30,6 +30,7 @@ class ThrowingPub implements Pub {
bool offline = false,
bool checkLastModified = true,
bool skipPubspecYamlCheck = false,
bool generateSyntheticPackage = false,
String flutterRootOverride,
}) {
throw UnsupportedError('Attempted to invoke pub during test.');