Skip to content
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
7 changes: 4 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -31,4 +32,4 @@
- changed-files:
- any-glob-to-any-file:
- packages/vector_math/**/*
- packages/flutter_hook_config/**/*
- packages/flutter_hook_extensions/**/*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down
6 changes: 0 additions & 6 deletions packages/flutter_hook_config/CHANGELOG.md

This file was deleted.

6 changes: 6 additions & 0 deletions packages/flutter_hook_extensions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> args) async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

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';

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');
Expand Down
Loading