Support plugins package sharding env.
Change-Id: Ie575f5241083239515fc49d52c5e594ac58347c1
Bug: https://github.com/flutter/flutter/issues/115596
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/36480
Reviewed-by: Stuart Morgan <stuartmorgan@google.com>
Commit-Queue: Keyong Han <keyonghan@google.com>
diff --git a/recipe_modules/repo_util/api.py b/recipe_modules/repo_util/api.py
index eaf1810..feeceaf 100644
--- a/recipe_modules/repo_util/api.py
+++ b/recipe_modules/repo_util/api.py
@@ -367,6 +367,9 @@
'REVISION':
self.get_commit(checkout_path)
}
+ package_sharding = self.m.properties.get('package_sharding', None)
+ if package_sharding:
+ env['PACKAGE_SHARDING'] = package_sharding
if self.m.properties.get('gn_artifacts', False):
env['FLUTTER_STORAGE_BASE_URL'
] = 'https://storage.googleapis.com/flutter_archives_v2'
diff --git a/recipe_modules/repo_util/examples/full.py b/recipe_modules/repo_util/examples/full.py
index 877066b..ed50feb 100644
--- a/recipe_modules/repo_util/examples/full.py
+++ b/recipe_modules/repo_util/examples/full.py
@@ -62,6 +62,7 @@
git_url='https://github.com/flutter/engine',
git_ref='refs/pull/1/head',
clobber=True,
+ package_sharding='shard1',
), api.repo_util.flutter_environment_data(),
api.step_data(
'Identify branches.git rev-parse',