diff --git a/.github/labeler.yml b/.github/labeler.yml index 2bfcbae..9d60a59 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,7 +1,8 @@ -'p: flutter_hook_config': +'p: flutter_hook_extensions': - changed-files: - any-glob-to-any-file: - - packages/flutter_hook_config/**/* + - packages/flutter_hook_extensions/**/* + 'p: flutter_template_images': - changed-files: - any-glob-to-any-file: @@ -31,4 +32,4 @@ - changed-files: - any-glob-to-any-file: - packages/vector_math/**/* - - packages/flutter_hook_config/**/* + - packages/flutter_hook_extensions/**/* diff --git a/README.md b/README.md index 5d54b04..0466897 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ These are the packages hosted in this repository: | Package | Pub | Points | Usage | Issues | Pull requests | |---------|-----|--------|-------|--------|---------------| -| [flutter\_hook\_config](./packages/flutter_hook_config/) | [![pub package](https://img.shields.io/pub/v/flutter_hook_config.svg)](https://pub.dev/packages/flutter_hook_config) | [![pub points](https://img.shields.io/pub/points/flutter_hook_config)](https://pub.dev/packages/flutter_hook_config/score) | [![downloads](https://img.shields.io/pub/dm/flutter_hook_config)](https://pub.dev/packages/flutter_hook_config/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20flutter_hook_config?label=)](https://github.com/flutter/flutter/labels/p%3A%20flutter_hook_config) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/core-packages/p%3A%20flutter_hook_config?label=)](https://github.com/flutter/core-packages/labels/p%3A%20flutter_hook_config) | +| [flutter\_hook\_extensions](./packages/flutter_hook_extensions/) | [![pub package](https://img.shields.io/pub/v/flutter_hook_extensions.svg)](https://pub.dev/packages/flutter_hook_extensions) | [![pub points](https://img.shields.io/pub/points/flutter_hook_extensions)](https://pub.dev/packages/flutter_hook_extensions/score) | [![downloads](https://img.shields.io/pub/dm/flutter_hook_extensions)](https://pub.dev/packages/flutter_hook_extensions/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20flutter_hook_extensions?label=)](https://github.com/flutter/flutter/labels/p%3A%20flutter_hook_extensions) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/core-packages/p%3A%20flutter_hook_extensions?label=)](https://github.com/flutter/core-packages/labels/p%3A%20flutter_hook_extensions) | | [flutter\_template\_images](./packages/flutter_template_images/) | [![pub package](https://img.shields.io/pub/v/flutter_template_images.svg)](https://pub.dev/packages/flutter_template_images) | [![pub points](https://img.shields.io/pub/points/flutter_template_images)](https://pub.dev/packages/flutter_template_images/score) | [![downloads](https://img.shields.io/pub/dm/flutter_template_images)](https://pub.dev/packages/flutter_template_images/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20flutter_template_images?label=)](https://github.com/flutter/flutter/labels/p%3A%20flutter_template_images) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/core-packages/p%3A%20flutter_template_images?label=)](https://github.com/flutter/core-packages/labels/p%3A%20flutter_template_images) | | [multicast\_dns](./packages/multicast_dns/) | [![pub package](https://img.shields.io/pub/v/multicast_dns.svg)](https://pub.dev/packages/multicast_dns) | [![pub points](https://img.shields.io/pub/points/multicast_dns)](https://pub.dev/packages/multicast_dns/score) | [![downloads](https://img.shields.io/pub/dm/multicast_dns)](https://pub.dev/packages/multicast_dns/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20multicast_dns?label=)](https://github.com/flutter/flutter/labels/p%3A%20multicast_dns) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/core-packages/p%3A%20multicast_dns?label=)](https://github.com/flutter/core-packages/labels/p%3A%20multicast_dns) | | [mustache\_template](./third_party/packages/mustache_template/) | [![pub package](https://img.shields.io/pub/v/mustache_template.svg)](https://pub.dev/packages/mustache_template) | [![pub points](https://img.shields.io/pub/points/mustache_template)](https://pub.dev/packages/mustache_template/score) | [![downloads](https://img.shields.io/pub/dm/mustache_template)](https://pub.dev/packages/mustache_template/score) | [![GitHub issues by-label](https://img.shields.io/github/issues/flutter/flutter/p%3A%20mustache_template?label=)](https://github.com/flutter/flutter/labels/p%3A%20mustache_template) | [![GitHub pull requests by-label](https://img.shields.io/github/issues-pr/flutter/core-packages/p%3A%20mustache_template?label=)](https://github.com/flutter/core-packages/labels/p%3A%20mustache_template) | diff --git a/packages/flutter_hook_config/CHANGELOG.md b/packages/flutter_hook_config/CHANGELOG.md deleted file mode 100644 index 253adf5..0000000 --- a/packages/flutter_hook_config/CHANGELOG.md +++ /dev/null @@ -1,6 +0,0 @@ -## 0.1.0 - -* Initial release of `flutter_hook_config`: a `package:hooks` protocol extension - that lets the Flutter SDK expose engine host-tool paths (`impellerc`, - `libtessellator`) to build and link hooks, including the `--local-engine` - override. diff --git a/packages/flutter_hook_config/.gitignore b/packages/flutter_hook_extensions/.gitignore similarity index 100% rename from packages/flutter_hook_config/.gitignore rename to packages/flutter_hook_extensions/.gitignore diff --git a/packages/flutter_hook_config/AUTHORS b/packages/flutter_hook_extensions/AUTHORS similarity index 100% rename from packages/flutter_hook_config/AUTHORS rename to packages/flutter_hook_extensions/AUTHORS diff --git a/packages/flutter_hook_extensions/CHANGELOG.md b/packages/flutter_hook_extensions/CHANGELOG.md new file mode 100644 index 0000000..e324a14 --- /dev/null +++ b/packages/flutter_hook_extensions/CHANGELOG.md @@ -0,0 +1,6 @@ +## 0.1.0 + +* Initial release of `flutter_hook_extensions`: a `package:hooks` protocol + extension that lets the Flutter SDK expose engine host-tool paths + (`impellerc`, `libtessellator`) to build and link hooks, including the + `--local-engine` override. diff --git a/packages/flutter_hook_config/LICENSE b/packages/flutter_hook_extensions/LICENSE similarity index 100% rename from packages/flutter_hook_config/LICENSE rename to packages/flutter_hook_extensions/LICENSE diff --git a/packages/flutter_hook_config/README.md b/packages/flutter_hook_extensions/README.md similarity index 86% rename from packages/flutter_hook_config/README.md rename to packages/flutter_hook_extensions/README.md index 1e8f44f..89a59fd 100644 --- a/packages/flutter_hook_config/README.md +++ b/packages/flutter_hook_extensions/README.md @@ -1,4 +1,4 @@ -# flutter_hook_config +# flutter_hook_extensions A [`package:hooks`](https://pub.dev/packages/hooks) protocol extension that lets the Flutter SDK pass Flutter-specific configuration to build and link hooks in a @@ -17,14 +17,14 @@ instead of the ones in the SDK cache. ## For hook authors -Add `flutter_hook_config` to your hook's dependencies and read the config from -the `BuildInput` / `LinkInput` via `input.config.flutter`. Always check +Add `flutter_hook_extensions` to your hook's dependencies and read the config +from the `BuildInput` / `LinkInput` via `input.config.flutter`. Always check `input.config.buildForFlutter` first: a hook may also be invoked by a plain `dart` build, or by a Flutter SDK that predates this extension, in which case no Flutter-specific config is available and you should fall back to your own tool discovery. -See the [library documentation](https://pub.dev/documentation/flutter_hook_config/latest/) +See the [library documentation](https://pub.dev/documentation/flutter_hook_extensions/latest/) for a usage example. ## For the Flutter SDK diff --git a/packages/flutter_hook_config/dart_test.yaml b/packages/flutter_hook_extensions/dart_test.yaml similarity index 100% rename from packages/flutter_hook_config/dart_test.yaml rename to packages/flutter_hook_extensions/dart_test.yaml diff --git a/packages/flutter_hook_config/lib/flutter_hook_config.dart b/packages/flutter_hook_extensions/lib/flutter_hook_extensions.dart similarity index 93% rename from packages/flutter_hook_config/lib/flutter_hook_config.dart rename to packages/flutter_hook_extensions/lib/flutter_hook_extensions.dart index 002c700..f632612 100644 --- a/packages/flutter_hook_config/lib/flutter_hook_config.dart +++ b/packages/flutter_hook_extensions/lib/flutter_hook_extensions.dart @@ -9,7 +9,7 @@ /// checking [HookConfigFlutterConfig.buildForFlutter] first: /// /// ```dart -/// import 'package:flutter_hook_config/flutter_hook_config.dart'; +/// import 'package:flutter_hook_extensions/flutter_hook_extensions.dart'; /// import 'package:hooks/hooks.dart'; /// /// void main(List args) async { diff --git a/packages/flutter_hook_config/lib/src/config.dart b/packages/flutter_hook_extensions/lib/src/config.dart similarity index 97% rename from packages/flutter_hook_config/lib/src/config.dart rename to packages/flutter_hook_extensions/lib/src/config.dart index 80e1e5e..e387f5c 100644 --- a/packages/flutter_hook_config/lib/src/config.dart +++ b/packages/flutter_hook_extensions/lib/src/config.dart @@ -76,7 +76,7 @@ extension HookConfigFlutterConfig on HookConfig { /// Whether this hook is being invoked as part of a Flutter build. /// /// When `false`, the hook is being invoked by a plain `dart` build, or by a - /// Flutter SDK that predates the `flutter_hook_config` extension, and + /// Flutter SDK that predates the `flutter_hook_extensions` extension, and /// [flutter] must not be accessed. Hooks that need Flutter-supplied /// configuration should fall back to their own discovery logic in that case. bool get buildForFlutter => _flutterExtensionJson != null; @@ -91,7 +91,7 @@ extension HookConfigFlutterConfig on HookConfig { throw StateError( 'No Flutter-specific hook configuration is available. The hook is not ' 'being invoked by a Flutter SDK, or the Flutter SDK predates ' - 'flutter_hook_config support. Check `config.buildForFlutter` first.', + 'flutter_hook_extensions support. Check `config.buildForFlutter` first.', ); } return FlutterConfig._(extensionJson); diff --git a/packages/flutter_hook_config/lib/src/extension.dart b/packages/flutter_hook_extensions/lib/src/extension.dart similarity index 100% rename from packages/flutter_hook_config/lib/src/extension.dart rename to packages/flutter_hook_extensions/lib/src/extension.dart diff --git a/packages/flutter_hook_config/pubspec.yaml b/packages/flutter_hook_extensions/pubspec.yaml similarity index 77% rename from packages/flutter_hook_config/pubspec.yaml rename to packages/flutter_hook_extensions/pubspec.yaml index e2fc433..94fae24 100644 --- a/packages/flutter_hook_config/pubspec.yaml +++ b/packages/flutter_hook_extensions/pubspec.yaml @@ -1,10 +1,10 @@ -name: flutter_hook_config +name: flutter_hook_extensions description: >- A package:hooks protocol extension that exposes Flutter engine host-tool paths (such as impellerc) to build and link hooks. version: 0.1.0 -repository: https://github.com/flutter/core-packages/tree/main/packages/flutter_hook_config -issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20flutter_hook_config%22 +repository: https://github.com/flutter/core-packages/tree/main/packages/flutter_hook_extensions +issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A%20flutter_hook_extensions%22 environment: sdk: ^3.10.0 diff --git a/packages/flutter_hook_config/test/flutter_hook_config_test.dart b/packages/flutter_hook_extensions/test/flutter_hook_extensions_test.dart similarity index 96% rename from packages/flutter_hook_config/test/flutter_hook_config_test.dart rename to packages/flutter_hook_extensions/test/flutter_hook_extensions_test.dart index d5c9b0c..8050b38 100644 --- a/packages/flutter_hook_config/test/flutter_hook_config_test.dart +++ b/packages/flutter_hook_extensions/test/flutter_hook_extensions_test.dart @@ -4,7 +4,7 @@ import 'dart:io'; -import 'package:flutter_hook_config/flutter_hook_config.dart'; +import 'package:flutter_hook_extensions/flutter_hook_extensions.dart'; import 'package:hooks/hooks.dart'; import 'package:test/test.dart'; @@ -12,7 +12,7 @@ void main() { // Absolute, OS-correct URIs so the file-path encoding round-trips on every // platform CI runs on. final Uri engineArtifactsDir = Directory.systemTemp.uri.resolve( - 'flutter_hook_config_test/engine/', + 'flutter_hook_extensions_test/engine/', ); final Uri impellerc = engineArtifactsDir.resolve('impellerc'); final Uri libtessellator = engineArtifactsDir.resolve('libtessellator');