Skip to content

Commit

Permalink
[native_assets_cli] Document NativeCodeAsset.file requiredness (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes authored Mar 22, 2024
1 parent 9a691ac commit 25ba300
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
5 changes: 5 additions & 0 deletions pkgs/native_assets_cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.5.1

- Update documentation about providing `NativeCodeAsset.file` in dry runs.
https://github.com/dart-lang/native/issues/1049

## 0.5.0

- **Breaking change** Completely rewritten API.
Expand Down
14 changes: 14 additions & 0 deletions pkgs/native_assets_cli/lib/src/api/native_code_asset.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@ abstract final class NativeCodeAsset implements Asset {
/// Either dynamic loading or static linking.
LinkMode get linkMode;

/// The file to be bundled with the Dart or Flutter application.
///
/// 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 [DynamicLoadingSystem], [LookupInProcess], or
/// [LookupInExecutable] the file must be omitted in the [BuildOutput] for
/// [BuildConfig.dryRun].
@override
Uri? get file;

/// Constructs a native code asset.
///
/// The [id] of this asset is a uri `package:<package>/<name>` from [package]
Expand Down
2 changes: 1 addition & 1 deletion pkgs/native_assets_cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: >-
native assets CLI.
# Note: Bump BuildConfig.version and BuildOutput.version on breaking changes!
version: 0.5.0
version: 0.5.1
repository: https://github.com/dart-lang/native/tree/main/pkgs/native_assets_cli

topics:
Expand Down

0 comments on commit 25ba300

Please sign in to comment.