Skip to content

Commit

Permalink
Use 'flutter pub global activate dartdoc' for Flutter packages. (#1428)
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Dec 10, 2024
1 parent 47c70b1 commit 0e2e647
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.22.17

- Fixed lower dependency constraint for `cli_util`.
- Use `flutter pub global activate dartdoc` for Flutter packages.

## 0.22.16

Expand Down
4 changes: 2 additions & 2 deletions lib/src/sdk_env.dart
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,11 @@ class ToolEnvironment {
timeout: timeout,
);
} else {
final command = usesFlutter ? _flutterSdk.flutterCmd : _dartSdk.dartCmd;
if (!_globalDartdocActivated) {
await runConstrained(
[
..._dartSdk.dartCmd,
...command,
'pub',
'global',
'activate',
Expand All @@ -447,7 +448,6 @@ class ToolEnvironment {
);
_globalDartdocActivated = true;
}
final command = usesFlutter ? _flutterSdk.flutterCmd : _dartSdk.dartCmd;
return await runConstrained(
[...command, 'pub', 'global', 'run', 'dartdoc', ...args],
workingDirectory: packageDir,
Expand Down
2 changes: 1 addition & 1 deletion lib/src/version.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pana
description: PAckage aNAlyzer - produce a report summarizing the health and quality of a Dart package.
version: 0.22.17-dev
version: 0.22.17
repository: https://github.com/dart-lang/pana
topics:
- tool
Expand Down

0 comments on commit 0e2e647

Please sign in to comment.