Skip to content

Commit

Permalink
Add version to linkoutput
Browse files Browse the repository at this point in the history
  • Loading branch information
mosuem committed May 2, 2024
1 parent e21c5f0 commit 9b4855f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkgs/native_assets_cli/lib/src/api/link.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import 'link_config.dart';
/// ```
Future<void> link(
List<String> arguments,
Future<void> Function(LinkConfig config, LinkOutput output) builder,
Future<void> Function(LinkConfig config, LinkOutput output) linker,
) async {
final config = LinkConfig.fromArguments(arguments) as LinkConfigImpl;

Expand All @@ -47,6 +47,6 @@ Future<void> link(
final linkOutput = HookOutputImpl(
dependencies: Dependencies(builtAssetsFiles),
);
await builder(config, linkOutput);
await linker(config, linkOutput);
await linkOutput.writeToFile(config: config);
}
6 changes: 6 additions & 0 deletions pkgs/native_assets_cli/lib/src/api/link_output.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,10 @@ abstract final class LinkOutput {
dependencies: dependencies,
timestamp: timestamp,
);

/// The version of [LinkOutput].
///
/// The link output is used in the protocol between the Dart and Flutter SDKs
/// and packages through build hook invocations.
static Version get latestVersion => HookOutputImpl.latestVersion;
}

0 comments on commit 9b4855f

Please sign in to comment.