Commit Graph

18 Commits

Author SHA1 Message Date
Sam Rawlins
ec28b057f2
create_api_docs.dart: correct command logging (#155226)
The tool currently prints that the _dart_ command is run, and does not include the 'pub' sub-command. Something like:

```none
/private/var/folders/72/ltck4q353hsg3bn8kpkg7f84005w15/T/flutterzXpww6/bin/dart \
    global run --enable-asserts dartdoc
```

(newline mine)

But this is incorrect; the `runPubGet` function runs the _flutter_ command, and prepends `pub` to the list of arguments.
2024-09-22 16:01:41 +00:00
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
Greg Spencer
183bc15816
Move snippets package back into flutter repo (#147690)
## Description

This moves the snippets package back into the Flutter repo so that API documentation generation can happen without the use of `dart pub global run` because `pub run` doesn't handle concurrency well.

The change modifies the dartdoc building process to include building an executable from the snippets tool and installing that in the cache directory for use during docs generation.

The snippets tool will reside in dev/snippets, where it originally resided before being moved to https://github.com/flutter/assets-for-api-docs.

The snippets code itself is unchanged from the code that is in https://github.com/flutter/assets-for-api-docs/packages/snippets.

## Related Issues
 - https://github.com/flutter/flutter/issues/144408
 - https://github.com/flutter/flutter/issues/147609
 - https://github.com/flutter/flutter/pull/147645

## Tests
 - Added snippets tests to the overall testing build.
2024-05-03 06:09:03 +00:00
Gray Mackall
286c73c0eb
Remove additional references to engine v1 android embedding (#146523)
https://github.com/flutter/engine/pull/51229 blocked [the roll](https://github.com/flutter/flutter/pull/146522) and had to be reverted, which is a shame, but on the bright side it made it possible to point the framework at my removal pr, at the point of its merging the first time 

This fixes all errors that are fixable in the framework that would have blocked the roll. There are some that aren't fixable here (they need to be fixed in the engine)*, so I'll fix those in the engine but unfortunately I can't pick up another version here to re-test until I try to roll again 😢 

*This category is: uses of plugins that in turn have a `registerWith`, that references the v1 embedding. The plan to fix these cases is to leave the interface that that method relies on around for now. See https://github.com/flutter/packages/pull/6494#issuecomment-2046010323 for details
2024-04-10 21:58:05 +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
Anis Alibegić
81d80c587d
Fixed a lot of typos (#141431)
Fair amount of typos spotted and fixed. Some of them are in comments, some of them are in code and some of them are in nondart files.

There is no need for issues since it's a typo fix.

I have doubts about [packages/flutter_tools/lib/src/ios/core_devices.dart](https://github.com/flutter/flutter/compare/master...anisalibegic:flutter:master#diff-fdbc1496b4bbe7e2b445a567fd385677af861c0093774e3d8cc460fdd5b794fa), I have a feeling it might broke some things on the other end, even though it's a typo.
2024-01-12 22:10:25 +00:00
Parker Lougheed
096cdc39a9
Update links and surrounding text for new main-api docs (#138602)
Issue reference: https://github.com/flutter/flutter/issues/133877
2023-11-17 22:27:53 +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
Michael Goderbauer
b966b2beee
Enable private field promotion for dev (#134480)
New feature in upcoming Dart 3.2. See https://github.com/dart-lang/language/issues/2020. Feature is enabled by bumping the min SDK version to 3.2.

Part of https://github.com/flutter/flutter/issues/134476.
2023-09-12 18:29:00 +00:00
Greg Spencer
ff829fd8b2
Add doxygen doc generation. (#131356) 2023-08-29 11:12:02 -07: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