Skip to content

Commit 29cf243

Browse files
authored
[code_assets] [data_assets] Explicitly mention buildXXXAssets (#2676)
1 parent 0924cb0 commit 29cf243

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

pkgs/code_assets/lib/src/code_assets/config.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ import 'syntax.g.dart';
1616
/// to code assets (only available if code assets are supported).
1717
extension HookConfigCodeConfig on HookConfig {
1818
/// Code asset specific configuration.
19+
///
20+
/// Only available if [buildCodeAssets] is true.
1921
CodeConfig get code => CodeConfig._fromJson(json, path);
2022

2123
/// Whether the hook invoker (e.g. the Dart or Flutter SDK) expects this
@@ -29,6 +31,8 @@ extension HookConfigCodeConfig on HookConfig {
2931
extension LinkInputCodeAssets on LinkInputAssets {
3032
/// The [CodeAsset]s in this [LinkInputAssets.encodedAssets].
3133
///
34+
/// Only available if [HookConfigCodeConfig.buildCodeAssets] is true.
35+
///
3236
/// NOTE: If the linker implementation depends on the contents of the files
3337
/// the code assets refer (e.g. looks at static archives and links them) then
3438
/// the linker script has to add those files as dependencies via
@@ -148,6 +152,8 @@ final class MacOSCodeConfig {
148152
/// Extension on [BuildOutputBuilder] to add [CodeAsset]s.
149153
extension BuildOutputAssetsBuilderCode on BuildOutputAssetsBuilder {
150154
/// Provides access to emitting code assets.
155+
///
156+
/// Should only be used if [HookConfigCodeConfig.buildCodeAssets] is true.
151157
BuildOutputCodeAssetBuilder get code => BuildOutputCodeAssetBuilder._(this);
152158
}
153159

pkgs/data_assets/lib/src/data_assets/config.dart

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,12 @@ extension BuildOutputBuilderAddDataAssetsDirectories on BuildOutputBuilder {
2323
///
2424
/// When recursive is set to true, the method will also add all subdirectories
2525
/// and their files as dependencies.
26+
///
27+
/// Should only be used if [HookConfigDataConfig.buildDataAssets] in [input]
28+
/// is true.
2629
Future<void> addDataAssetDirectories(
2730
List<String> paths, {
28-
required BuildInput input,
31+
required HookInput input,
2932
bool recursive = false,
3033
AssetRouting routing = const ToAppBundle(),
3134
}) async {
@@ -104,6 +107,8 @@ extension LinkInputDataAssets on LinkInputAssets {
104107
/// Extension on [BuildOutputBuilder] to add [DataAsset]s.
105108
extension BuildOutputAssetsBuilderData on BuildOutputAssetsBuilder {
106109
/// Provides access to emitting data assets.
110+
///
111+
/// Should only be used if [HookConfigDataConfig.buildDataAssets] is true.
107112
BuildOutputDataAssetsBuilder get data => BuildOutputDataAssetsBuilder._(this);
108113
}
109114

0 commit comments

Comments
 (0)