From 2c1cc1ac855ceca77c3f93ae8767dc5bf331790a Mon Sep 17 00:00:00 2001 From: Alex Li Date: Tue, 5 Dec 2023 21:55:22 +0800 Subject: [PATCH] Update prepare_for_embedded.dart --- pkgs/cronet_http/tool/prepare_for_embedded.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkgs/cronet_http/tool/prepare_for_embedded.dart b/pkgs/cronet_http/tool/prepare_for_embedded.dart index d7541f0e88..7b8cb04f31 100644 --- a/pkgs/cronet_http/tool/prepare_for_embedded.dart +++ b/pkgs/cronet_http/tool/prepare_for_embedded.dart @@ -40,7 +40,7 @@ final _cronetVersionUri = Uri.https( 'android/maven2/org/chromium/net/group-index.xml', ); -void main() async { +void main(List args) async { if (Directory.current.path.endsWith('tool')) { _packageDirectory = Directory.current.parent; } else { @@ -49,7 +49,10 @@ void main() async { final latestVersion = await _getLatestCronetVersion(); updateCronetDependency(latestVersion); - updatePubSpec(); + // Runs `prepare_for_embedded.dart true` for publishing. + if (args.isNotEmpty && args.fisrt == 'true') { + updatePubSpec(); + } updateReadme(); }