From 39591df523b32ababe439c923193b5c9676bbb52 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 17 Jun 2024 15:53:56 -0700 Subject: [PATCH] Pipe the '--stats' flag through for the 'doc sdk' task (#3791) --- tool/task.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tool/task.dart b/tool/task.dart index 7ec3b83277..de40c21ddd 100644 --- a/tool/task.dart +++ b/tool/task.dart @@ -299,7 +299,7 @@ Future runDoc(ArgResults commandResults) async { 'flutter' => docFlutter(withStats: stats), 'help' => _docHelp(), 'package' => _docPackage(commandResults, withStats: stats), - 'sdk' => docSdk(), + 'sdk' => docSdk(withStats: stats), 'testing-package' => docTestingPackage(), _ => throw UnimplementedError('Unknown doc target: "$target"'), }; @@ -462,9 +462,10 @@ Future docPackage({ return path.join(pubPackageDir.absolute.path, 'doc', 'api'); } -Future docSdk() async => _docSdk( +Future docSdk({bool withStats = false}) async => _docSdk( sdkDocsPath: _sdkDocsDir.path, dartdocPath: Directory.current.path, + withStats: withStats, ); /// Creates a throwaway pub cache and returns the environment variables @@ -547,6 +548,7 @@ Future compareSdkWarnings() async { Future>> _docSdk({ required String sdkDocsPath, required String dartdocPath, + bool withStats = false, }) async { var launcher = SubprocessLauncher('build-sdk-docs'); await launcher @@ -570,6 +572,7 @@ Future>> _docSdk({ 'lib/resources/blank.txt', ], workingDirectory: dartdocPath, + withStats: withStats, ); }