Commit Graph

95 Commits

Author SHA1 Message Date
Greg Spencer
e06738bba4
Add fake dependency on flutter_gpu for the docs (#153325)
## Description

This adds a fake dependency to the docs generation for the `flutter_gpu` package so that it will be included in the docs even though Flutter itself doesn't depend on it directly.

## Related Issues

 - Fixes https://github.com/flutter/flutter/issues/153320

## Tests

 - Adding a test to the canary files that the docs generation script looks for. (Not yet added: still draft)
2024-08-13 01:55:07 +00:00
Michael Goderbauer
52bb198fb2
Remove master from API docs (#144425) 2024-03-01 01:06:56 +00:00
Michael Goderbauer
e41ffcb742
Reland "Use dartpad's main channel for master/main docs (#144329)" (#144431)
Fix is in the second commit. The logic here went out of sync with the logic in the snippets generator from https://github.com/flutter/assets-for-api-docs, whose version was bumped as part of this change.
2024-02-29 23:10:53 +00:00
auto-submit[bot]
b099bf0b4c
Reverts "Use dartpad's main channel for master/main docs (#144329)" (#144429)
Reverts flutter/flutter#144329
Initiated by: goderbauer
Reason for reverting: broke postsubmit doc generation.
Original PR Author: goderbauer

Reviewed By: {devoncarew, HansMuller, gspencergoog}

This change reverts the following previous change:
Original Description:
Dartpad doesn't have a "master" channel anymore, it got renamed to "main". Sadly, specifying "master" is now falling back to "stable" which breaks some of our examples in the docs that require a more current Flutter version, e.g. https://main-api.flutter.dev/flutter/material/TextButton-class.html
2024-02-29 21:57:18 +00:00
Michael Goderbauer
41eeb2bb8c
Use dartpad's main channel for master/main docs (#144329)
Dartpad doesn't have a "master" channel anymore, it got renamed to "main". Sadly, specifying "master" is now falling back to "stable" which breaks some of our examples in the docs that require a more current Flutter version, e.g. https://main-api.flutter.dev/flutter/material/TextButton-class.html
2024-02-29 19:08:25 +00:00
Andrew Kolos
295a9a2031
provide command to FakeCommand::onRun (#142206)
Part of work on [#101077](https://github.com/flutter/flutter/pull/141194). This is done as a separate PR to avoid a massive diff.

## Context
1. The `FakeCommand` class accepts a list of patterns that's used to match a command given to its `FakeProcessManager`. Since `FakeCommand` can match a list of patterns, not just specifically strings, it can be used to match commands where the exact value of some arguments can't (easily) known ahead of time. For example, a part of the tool may invoke a command with an argument that is the path of a temporarily file that has a randomly-generated basename.
2. The `FakeCommand` class provides on `onRun` parameter, which is a callback that is run when the `FakeProcessManager` runs a command that matches the `FakeCommand` in question.

## Issue
In the event that a `FakeCommand` is constructed using patterns, the test code can't know the exact values used for arguments in the command. This PR proposes changing the type of `onRun` from `VoidCallback?` to `void Function(List<String>)?`. When run, the value `List<String>` parameter will be the full command that the `FakeCommand` matched.

Example:
```dart
FakeCommand(
  command: <Pattern>[
    artifacts.getArtifactPath(Artifact.engineDartBinary),
    'run',
    'vector_graphics_compiler',
    RegExp(r'--input=/.*\.temp'),
    RegExp(r'--output=/.*\.temp'),
  ],
  onRun: (List<String> command) {
    final outputPath = (() { 
      // code to parse `--output` from `command`
    })();
    testFileSystem.file(outputPath).createSync(recursive: true);
  },
)
```
2024-01-25 07:51:25 +00:00
Christopher Fujino
4dcd1598b7
update analytics in generate api docs site to use new UA4 (#136497)
Change the analytics instance that the generated api.flutter.dev and master-api.flutter.dev use.
2023-10-16 19:47:48 +00:00
Christopher Fujino
c353e641ad
run tests under dev/tools as part of framework-misc and get them passing (#136501)
part of https://github.com/flutter/flutter/issues/136500

this should not affect any production code, it merely runs the tests on CI and makes the changes needed to get them passing.
2023-10-13 18:48:43 +00:00
Greg Spencer
5bd8579bc8
Use flutter pub get instead of dart pub get in create_api_docs.dart (#133493) 2023-08-28 16:12:16 -07:00
Zachary Anderson
d5a162b788
Forward port API docs creation realm handling from prior script (#132867)
It looks like the logic added here:


https://github.com/flutter/flutter/pull/131951/files#diff-297ee4cfe6d9bffc2fa1376918a50b8e4165ada4569575880c40811b6f749265R18

got dropped in the refactor here:

https://github.com/flutter/flutter/pull/132710
2023-08-18 15:33:27 -07:00
Greg Spencer
ced3e76626
Reland: "Reorganize and clarify API doc generator" (#132353) (#132710)
## Description

This re-lands #132353 with some additional options for keeping around the staging directory, so that the recipe for publishing docs can give those options and have the staging directory left around for deploying to the website.

Reverted in #132613

## Related Issues
 - https://flutter-review.googlesource.com/c/recipes/+/49580
2023-08-17 23:53:06 +00:00
Jonah Williams
909400dc4d
Revert "Reorganize and clarify API doc generator" (#132613)
Reverts flutter/flutter#132353

Educated guess that this is causing the docs failures: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8772644466113801713/+/u/Docs/Deploy_docs/Firebase_deploy/stdout
2023-08-16 02:47:26 +00:00
Greg Spencer
899a29f830
Reorganize and clarify API doc generator (#132353)
## Description

This cleans up a lot of issues with the API doc generation.

Here are the main changes:
 - Rename `dartdoc.dart` to `create_api_docs.dart`
 - Move the bulk of the operations out of `dev/bots/docs.sh` into `create_api_docs.dart`.
 - Delete `dashing_postprocess.dart` and `java_and_objc.dart` and incorporate those operations into `create_api_docs.dart`.
 - Refactor the doc generation into more understandable classes
 - Bump the snippets tool version to 0.4.0 (the latest one)
 - Centralize the information gathering about the Flutter repo into the new `FlutterInformation` class.
 - Clean up the directory handling, and convert to using the `file` package for all file and directory paths.
 - Add an `--output` option to docs.sh that specifies the location of the output ZIP file containing the docs.
   - Defaults to placing the output in `dev/docs/api_docs.zip` (i.e. where the previous code generates the file).
 - Moved all document generation into a temporary folder that is removed once the documents are generated, to avoid VSCode and other IDEs trying to index the thousands of HTML and JS files in the docs output.
 - Updated pubspec dependencies.

## Tests
 - Added tests for doc generation.
2023-08-15 22:12:16 +00:00
Pierre-Louis
0919fb86f1
Improve handling of certain icons in RTL (#130979)
Fixes https://github.com/flutter/flutter/issues/130978 

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2023-07-21 19:07:39 +02:00
Pierre-Louis
d8f7c3d362
Refactor icon update script (#122392)
* x

* docs
2023-03-13 22:17:35 +01:00
Pierre-Louis
7855132341
Generate a demo for new icons when updating icons (#101190)
* add code to generate new icon demo and make font family optional

* remove trailing spaces

* Update update_icons_test.dart

* remove trailing space
2022-04-05 12:56:23 +02:00
Devon Carew
45f8c39052
use 'dart pub' instead of calling the pub executable directly (#97749)
use 'dart pub' instead of calling the pub executable directly
2022-02-04 12:45:20 -08:00
Pierre-Louis
6bd0b95728
[Icons] Prevent double underscores after replacement (#96904)
* Prevent double underscores after replacement

* add test

* remove trailing space
2022-01-30 13:16:32 +01:00
Pierre-Louis
b23f207e2c
Improve update_icons.dart script (#93863)
* Update update_icons.dart

* formatting

* more formatting

* simplify safety checks

* add safety checks tests

* formatting

* update copyright

* naming

* revert copyright

* add `fontFamily` option

* tweak diff messages

* Update update_icons.dart

* don't exit if platform adaptive icon not found

* remove trailing spaces

* remove warning and fix insert_chart (outlined) dartdoc

* x

* add error message when exiting due to failed safety checkes

* fix icon reference

* fix rewrite for onetwothree
2021-12-08 16:31:48 +01:00
Sam Rawlins
8889ffaec3
Remove and also ignore unnecessary imports (#89796) 2021-09-14 15:32:02 -07:00
Christopher Fujino
2ba15a5aba
teach dartdoc.dart about LUCI_BRANCH env var (#86592) 2021-07-19 12:20:00 -07:00
Christopher Fujino
62d00c6d5f
Migrate flutter conductor out of dev/tools and into its own directory (#83313)
* Migrate flutter conductor out of dev/tools and into its own directory

* flesh out documentation

* fix analysis options

* fix integration test
2021-05-25 16:12:53 -07:00
Christopher Fujino
2123c93aa7
fix candidates (#82957) 2021-05-20 17:34:05 -07:00
Christopher Fujino
660ec207e6
[flutter_conductor] Re-land auto-apply dart revision (#82985) 2021-05-20 16:58:11 -07:00
Christopher Fujino
843083c93a
Revert "[flutter_conductor] Auto apply dart revision (#82601)" (#82983)
This reverts commit e86f9c7a7c.
2021-05-19 21:38:45 -07:00
Christopher Fujino
e86f9c7a7c
[flutter_conductor] Auto apply dart revision (#82601) 2021-05-19 21:23:26 -07:00
Christopher Fujino
84b2f3cadb
delete skipped test (#81843) 2021-05-11 14:19:01 -07:00
Christopher Fujino
a5318173fe
apply cherrypicks (#81936) 2021-05-11 13:19:05 -07:00
Sam Rawlins
208bf4bc92
Remove "unnecessary" imports in dev/ (#81004) 2021-05-07 08:59:02 -07:00
Christopher Fujino
7b3ce8c003
[flutter_conductor] Add candidates sub command (#81234) 2021-05-03 16:49:04 -07:00
Ian Hickson
6beafa7b16
Apply style guide regarding createTempSync pattern (#81090) 2021-04-27 14:59:03 -07:00
Christopher Fujino
3155972744
Skip roll-dev integration test until dev release is published (#81253) 2021-04-26 17:36:16 -07:00
Christopher Fujino
8654e4ae3e
begin migrating //flutter/dev/tools to null-safety (#80834) 2021-04-23 20:24:03 -07:00
Phil Quitslund
61c30c41b2
fix sort_directives violations (#80817) 2021-04-21 13:49:03 -07:00
Christopher Fujino
4a7f280687
[flutter_conductor] Add "start", "status", "clean" commands to conductor release tool (#80528) 2021-04-19 15:04:04 -07:00
Christopher Fujino
a219b86db8
skip roll_dev_integration_test (#80464) 2021-04-14 14:16:08 -07:00
Tong Mu
8a821ff0b5
Revert "Remove "unnecessary" imports. (#79610)" (#80070)
This reverts commit 98a9618993.
2021-04-08 11:36:30 -07:00
Sam Rawlins
98a9618993
Remove "unnecessary" imports. (#79610) 2021-04-07 22:34:03 -07:00
Ian Hickson
f3c25fa07a
Align more closely with package:test (#77118) (#78343) 2021-03-16 13:58:02 -07:00
Zachary Anderson
e7e1a04aa3
Revert "Align more closely with package:test (#77118)" (#78329)
This reverts commit 0cbe597540.
2021-03-16 09:26:34 -07:00
Ian Hickson
0cbe597540
Align more closely with package:test (#77118) 2021-03-15 16:28:02 -07:00
Michael Goderbauer
cb867bbedc
Enable unnecessary_await_in_return lint (#77434) 2021-03-05 18:38:15 -08:00
Jonah Williams
021311ed8a
Revert "[flutter_tools] move process manager into tool (#75350)" (#75639)
This reverts commit 8b6baae44c.
2021-02-08 09:21:46 -08:00
Jonah Williams
8b6baae44c
[flutter_tools] move process manager into tool (#75350)
Our current top crasher is an unclear error when ProcessManager fails to resolve an executable path. To fix this, we'd like to being adjusting the process resolution logic and adding more instrumentation to track failures. In order to begin the process, the ProcessManager has been folded back into the flutter tool
2021-02-04 13:19:11 -08:00
Christopher Fujino
353add83e7
Re-land codesign test improvement (#73997) 2021-01-25 14:04:04 -08:00
Christopher Fujino
66ba4b244d
Revert "Improve codesign script (#71244)" (#73961)
This reverts commit b7f5aef11a.
2021-01-14 18:40:29 +00:00
Christopher Fujino
b7f5aef11a
Improve codesign script (#71244) 2021-01-14 18:22:08 +00:00
Christopher Fujino
b8887f47f7
fix and re-enable integration test (#70666) 2020-11-18 11:13:04 -08:00
Christopher Fujino
b8e39b1ad0
skip roll_dev_integration_test (#70653) 2020-11-16 14:11:22 -08:00
Christopher Fujino
772437627b
[flutter_conductor] update dev/tools with release tool (#69791) 2020-11-06 11:14:04 -08:00