Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[various] Clean up contributing guides #8032

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions packages/camera/camera_android_camerax/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ to generate the communication layer between Flutter and native Android code, so
of these Dart-wrapped classes may also have Host API and Flutter API implementations
that handle communication to the host native Android platform and from the host
native Android platform, respectively. The communication interface is defined in
the `pigeons/camerax_library.dart` file. After editing the communication interface,
regenerate the communication layer by running
`dart run pigeon --input pigeons/camerax_library.dart` from the plugin root.
the `pigeons/camerax_library.dart` file.

In the native Java Android code in `android/src/main/java/io/flutter/plugins/camerax/`,
you'll find the Host API and Flutter API implementations of the same classes
Expand All @@ -54,7 +52,7 @@ annotated as `@immutable` to avoid lint errors with mock objects that are
generated for them that you may use for testing.

For more information, please see the [design document][2] or feel free
to ask any questions on the #hackers-ecosystem channel on [Discord][6]. For
to ask any questions on the #hackers-ecosystem channel on [Discord][4]. For
more information on contributing packages in general, check out our
[contribution guide][3].

Expand All @@ -65,14 +63,8 @@ wrapped native Android classes (Java & Dart) are tested. You can find the Java t
`android/src/test/java/io/flutter/plugins/camerax/` and the Dart tests under `test/`. To
run these tests, please see the instructions in the [running plugin tests guide][5].

Besides [`pigeon`][1], this plugin also uses [`mockito`][4] to generate mock objects for
testing purposes. To generate the mock objects, run
`dart run build_runner build --delete-conflicting-outputs`.


[1]: https://pub.dev/packages/pigeon
[2]: https://docs.google.com/document/d/1wXB1zNzYhd2SxCu1_BK3qmNWRhonTB6qdv4erdtBQqo/edit?usp=sharing&resourcekey=0-WOBqqOKiO9SARnziBg28pg
[3]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
[4]: https://pub.dev/packages/mockito
[4]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[5]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/testing/Plugin-Tests.md#running-tests
[6]: https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.6+12

* Updates README to remove contributor-focused documentation.

## 0.3.6+11

* Bumps androidx.annotation:annotation from 1.8.2 to 1.9.0.
Expand Down
14 changes: 0 additions & 14 deletions packages/in_app_purchase/in_app_purchase_android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,6 @@ Using the Alternative billing only feature requires Google Play app configuratio
## Migrating to 0.3.0
To migrate to version 0.3.0 from 0.2.x, have a look at the [migration guide](migration_guide.md).

## Contributing

This plugin uses
[json_serializable](https://pub.dev/packages/json_serializable) for the
many data structs passed between the underlying platform layers and Dart. After
editing any of the serialized data structs, rebuild the serializers by running
`flutter packages pub run build_runner build --delete-conflicting-outputs`.
`flutter packages pub run build_runner watch --delete-conflicting-outputs` will
watch the filesystem for changes.

If you would like to contribute to the plugin, check out our
[contribution guide](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md).


[1]: https://pub.dev/packages/in_app_purchase
[2]: https://flutter.dev/to/endorsed-federated-plugin
[3]: https://pub.dev/packages/in_app_purchase_android/install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase_android
description: An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs.
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 0.3.6+11
version: 0.3.6+12

environment:
sdk: ^3.5.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.3.18+5

* Updates README to remove contributor-focused documentation.

## 0.3.18+4

* Adds StoreKit 2 support for restoring purchases.
Expand Down
14 changes: 0 additions & 14 deletions packages/in_app_purchase/in_app_purchase_storekit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@ so you do not need to add it to your `pubspec.yaml`.
However, if you `import` this package to use any of its APIs directly, you
should [add it to your `pubspec.yaml` as usual][3].

## Contributing

This plugin uses
[json_serializable](https://pub.dev/packages/json_serializable) for the
many data structs passed between the underlying platform layers and Dart. After
editing any of the serialized data structs, rebuild the serializers by running
`flutter packages pub run build_runner build --delete-conflicting-outputs`.
`flutter packages pub run build_runner watch --delete-conflicting-outputs` will
watch the filesystem for changes.

If you would like to contribute to the plugin, check out our
[contribution guide](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md).


[1]: ../in_app_purchase
[2]: https://flutter.dev/to/endorsed-federated-plugin
[3]: https://pub.dev/packages/in_app_purchase_storekit/install
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: in_app_purchase_storekit
description: An implementation for the iOS and macOS platforms of the Flutter `in_app_purchase` plugin. This uses the StoreKit Framework.
repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_storekit
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22
version: 0.3.18+4
version: 0.3.18+5

environment:
sdk: ^3.3.0
Expand Down
14 changes: 6 additions & 8 deletions packages/interactive_media_ads/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,9 @@ To update a wrapper for a platform, follow the steps:
- [iOS SDK]
- Pigeon file to update: `pigeons/interactive_media_ads_ios.dart`

##### 3. Run the code generator from the terminal
Once the file is updated, [run pigeon] to update generated code with the changes.

* Android: `dart run pigeon --input pigeons/interactive_media_ads_android.dart`
* iOS: `dart run pigeon --input pigeons/interactive_media_ads_ios.dart`

##### 4. Update the generated APIs in native code
##### 3. Update the generated APIs in native code

Running the `flutter build` step from step 1 again should provide build errors and indicate what
needs to be done. Alternatively, it can be easier to update native code with the platform's specific
Expand All @@ -158,7 +155,7 @@ IDE:
* Android: Open `example/android/` in a separate Android Studio project.
* iOS: Open `example/ios/` in Xcode.

##### 5. Write API tests
##### 4. Write API tests

Assuming a non-static method or constructor was added to the native wrapper, a native test will need
to be added.
Expand All @@ -169,8 +166,7 @@ to be added.
#### Dart Unit Testing

Tests for the platform implementations use [mockito] to generate mock objects of the native Dart
wrappers. To generate the mock objects in `test/`, run
`dart run build_runner build --delete-conflicting-outputs`.
wrappers. To generate the mock objects in `test/`, [run mockito].

### App-facing Interface

Expand Down Expand Up @@ -214,3 +210,5 @@ implementation.
[Android SDK]: https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/api/reference/com/google/ads/interactivemedia/v3/api/package-summary
[iOS SDK]: https://developers.google.com/interactive-media-ads/docs/sdks/ios/client-side/reference/Classes
[mockito]: https://pub.dev/packages/mockito
[run pigeon]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#pigeon
[run mockito]: https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#mockito
31 changes: 0 additions & 31 deletions packages/video_player/video_player_android/CONTRIBUTING.md

This file was deleted.

31 changes: 0 additions & 31 deletions packages/video_player/video_player_avfoundation/CONTRIBUTING.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.0.2

* Updates README to remove contributor-focused documentation.

## 4.0.1

* Adds `missing_code_block_language_in_doc_comment` lint.
Expand Down
18 changes: 0 additions & 18 deletions packages/webview_flutter/webview_flutter_android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,5 @@ androidController.setCustomWidgetCallbacks(
);
```

## Contributing

This package uses [pigeon][3] to generate the communication layer between Flutter and the host
platform (Android). The communication interface is defined in the `pigeons/android_webview.dart`
file. After editing the communication interface regenerate the communication layer by running
`dart run pigeon --input pigeons/android_webview.dart`.

Besides [pigeon][3] this package also uses [mockito][4] to generate mock objects for testing
purposes. To generate the mock objects run the following command:
```bash
dart run build_runner build --delete-conflicting-outputs
```

If you would like to contribute to the plugin, check out our [contribution guide][5].

[1]: https://pub.dev/packages/webview_flutter
[2]: https://flutter.dev/to/endorsed-federated-plugin
[3]: https://pub.dev/packages/pigeon
[4]: https://pub.dev/packages/mockito
[5]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: webview_flutter_android
description: A Flutter plugin that provides a WebView widget on Android.
repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_android
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
version: 4.0.1
version: 4.0.2

environment:
sdk: ^3.5.0
Expand Down
4 changes: 4 additions & 0 deletions packages/webview_flutter/webview_flutter_web/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.2.3+4

* Updates README to remove contributor-focused documentation.

## 0.2.3+3

* Adds `missing_code_block_language_in_doc_comment` lint.
Expand Down
14 changes: 14 additions & 0 deletions packages/webview_flutter/webview_flutter_web/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Contributing

For general information about contributing, please see
[our contributing docs](https://github.com/flutter/packages/blob/main/CONTRIBUTING.md).

## Tests

Tests are contained in the `test` directory. You can run all tests from the root
of the package with the following command:

```bash
$ flutter test --platform chrome
```
Comment on lines +11 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for keeping this!


16 changes: 0 additions & 16 deletions packages/webview_flutter/webview_flutter_web/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,3 @@ yet, so it currently requires extra setup to use:

Once the step above is complete, the APIs from `webview_flutter` listed
above can be used as normal on web.

## Tests

Tests are contained in the `test` directory. You can run all tests from the root
of the package with the following command:

```bash
$ flutter test --platform chrome
```

This package uses `package:mockito` in some tests. Mock files can be updated
from the root of the package like so:

```bash
$ flutter pub run build_runner build --delete-conflicting-outputs
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: webview_flutter_web
description: A Flutter plugin that provides a WebView widget on web.
repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_web
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
version: 0.2.3+3
version: 0.2.3+4

environment:
sdk: ^3.4.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.16.2

* Updates README to remove contributor-focused documentation.

## 3.16.1

* Adds `missing_code_block_language_in_doc_comment` lint.
Expand Down
18 changes: 0 additions & 18 deletions packages/webview_flutter/webview_flutter_wkwebview/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,5 @@ Objective-C:

Then you will have access to the native class `FWFWebViewFlutterWKWebViewExternalAPI`.

## Contributing

This package uses [pigeon][3] to generate the communication layer between Flutter and the host
platform (iOS). The communication interface is defined in the `pigeons/web_kit.dart`
file. After editing the communication interface regenerate the communication layer by running
`dart run pigeon --input pigeons/web_kit.dart`.

Besides [pigeon][3] this package also uses [mockito][4] to generate mock objects for testing
purposes. To generate the mock objects run the following command:
```bash
dart run build_runner build --delete-conflicting-outputs
```

If you would like to contribute to the plugin, check out our [contribution guide][5].

[1]: https://pub.dev/packages/webview_flutter
[2]: https://flutter.dev/to/endorsed-federated-plugin
[3]: https://pub.dev/packages/pigeon
[4]: https://pub.dev/packages/mockito
[5]: https://github.com/flutter/packages/blob/main/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: webview_flutter_wkwebview
description: A Flutter plugin that provides a WebView widget based on Apple's WKWebView control.
repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_wkwebview
issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22
version: 3.16.1
version: 3.16.2

environment:
sdk: ^3.5.0
Expand Down