diff --git a/pkgs/native_assets_cli/CHANGELOG.md b/pkgs/native_assets_cli/CHANGELOG.md index c9a79e67d1..7cb4bce9af 100644 --- a/pkgs/native_assets_cli/CHANGELOG.md +++ b/pkgs/native_assets_cli/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.4 + +- Update documentation about providing `NativeCodeAsset.file` in dry runs. + ## 0.5.3 - Fix V1_0_0 dry run backwards compatibility. diff --git a/pkgs/native_assets_cli/lib/src/api/native_code_asset.dart b/pkgs/native_assets_cli/lib/src/api/native_code_asset.dart index 83ecb31f01..b5f08f79a1 100644 --- a/pkgs/native_assets_cli/lib/src/api/native_code_asset.dart +++ b/pkgs/native_assets_cli/lib/src/api/native_code_asset.dart @@ -64,8 +64,10 @@ abstract final class NativeCodeAsset implements Asset { /// How this file is bundled depends on the kind of asset, represented by a /// concrete subtype of [Asset], and the SDK (Dart or Flutter). /// - /// If the [linkMode] is [DynamicLoadingBundled], the file most be provided in - /// the [BuildOutput] for [BuildConfig.dryRun]. + /// If the [linkMode] is [DynamicLoadingBundled], the file name must be + /// provided in the [BuildOutput] for [BuildConfig.dryRun]. Supplying a file + /// name instead of an absolute path is enough for [BuildConfig.dryRun]. The + /// file does not have to exist on disk during a dry run. /// /// If the [linkMode] is [DynamicLoadingSystem], [LookupInProcess], or /// [LookupInExecutable] the file must be omitted in the [BuildOutput] for @@ -126,8 +128,13 @@ abstract final class DynamicLoading implements LinkMode {} /// At runtime, the dynamic library will be loaded and the symbols will be /// looked up in this dynamic library. /// -/// An asset with this dynamic loading method must provide a [Asset.file]. The -/// Dart and Flutter SDK will bundle this code in the final application. +/// An asset with this dynamic loading method must provide a +/// [NativeCodeAsset.file]. The Dart and Flutter SDK will bundle this code in +/// the final application. +/// +/// During a [BuildConfig.dryRun], the [NativeCodeAsset.file] can be a file name +/// instead of a the full path. The file does not have to exist during a dry +/// run. abstract final class DynamicLoadingBundled implements DynamicLoading { factory DynamicLoadingBundled() = DynamicLoadingBundledImpl; } diff --git a/pkgs/native_assets_cli/pubspec.yaml b/pkgs/native_assets_cli/pubspec.yaml index 081d6a6546..e567de6278 100644 --- a/pkgs/native_assets_cli/pubspec.yaml +++ b/pkgs/native_assets_cli/pubspec.yaml @@ -4,7 +4,7 @@ description: >- native assets CLI. # Note: Bump BuildConfig.version and BuildOutput.version on breaking changes! -version: 0.5.3 +version: 0.5.4 repository: https://github.com/dart-lang/native/tree/main/pkgs/native_assets_cli topics: