NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #407 most downloaded on pub.dev
A library that contains the argument and file formats for implementing a native assets CLI.
Last release 1 years ago
29 Apr 2025
Ships fairly regularly
a new release about every 5 weeks
Nearly every release is documented
notes for 29 of 29 stable releases
1 version withdrawn
withdrawn after publishing
3 years old
31 releases · first in 2023
Breaking change Reorganized the libraries structure. Classes are no longer exported multiple times.
Breaking change Removed support for old JSONs. Newer SDKs will not work with older hooks, and the lower bound of this package is bumped. #2199
One column per quarter.
Support relative paths in user-defines to be loaded as absolute paths.
Breaking change JSON encoding migration: change written asset type to the namespaced one. Still keep reading the old one. (Old build hooks will keep w…
Nothing published for this version
Added support for sending assets between build hooks via the ToBuild Routing. This replaces the deprecated Metadata.
ToBuild
Routing. This replaces the deprecated Metadata.Breaking change Removed CodeAsset.type, use EncodedAsset.isCodeAsset instead.
CodeAsset.type, use EncodedAsset.isCodeAsset
instead.CodeAsset.os and CodeAsset.architecture. Use
CodeConfig.targetOS and CodeConfig.targetArchitecture instead.HookInput.outputDirectory is now based on HookInput.outputDirectoryShared.
The outputDirectory now creates its own subdirectory inside
outputDirectoryShared.Added validation that all URLs in the Input and Output of hooks are absolute.
Input and Output of hooks are
absolute.addDataAssetDirectories extension method on BuildOutputBuilder.Breaking change Complete overhaul of the API used in build and link hooks. The BuildConfig is now split in BuildInput and BuildConfig. The input is ev…
BuildConfig is now split in BuildInput and BuildConfig. The input is
everything passed in to the hook. The config (a part of the input) is what
shouldn't change on subsequent invocations of the same flutter or dart command
for the same target. The outputDirectory is the same if the config is the
same.output.json is now part of BuildInput.Breaking change The library import paths changed to be per asset type. (This enables extensibility with custom asset types.)
supportedAssetTypes to buildAssetTypes. Hooks
should no longer fail. Instead, the code should fail at runtime if an asset is
missing. This enables (1) code to run if an asset is missing but that code is
not invoked at runtime, and (2) doing fallback implementations in Dart if an
asset is missing.BuildMode to package:native_toolchain_c. This way
it can be controlled in the build hook together with the OptimizationLevel.
Most likely, every package should ship with release. BuildMode.debug
should only be used while developing the package locally.HookConfig.targetOS to CodeConfig. DataAssets
and other asset types should not depend on OS for now.testBuildHook and
testCodeBuildHook; instead of defining tests, these methods should now be
called from within tests.package:test dependency from a regular dependency (exported to
calling packages) to a dev_dependency.Breaking change Moved some methods to be extension methods.
BuildConfig and LinkConfig outputDirectoryShared.package:native_assets_cli/locking.dart with runUnderDirectoryLock.
Hook writers should not use this, the native_assets_builder does this.package:cli_config and package:args: it minimizes
dependencies and it simplifies logic any hook has to do (as it no longer has
to look into environment variables, arguments and json file, determine which
has presence over other, etc)DART_HOOK_TESTING prefix for environment variables used for testing on
Dart CIconfig.json against any base uri.
The hook/{build,link}.dart invoker has to ensure the uris it encodes can be
opened as-is (i.e. without resolving against any base uri)BuildConfig and BuildOutput now expose fromJson and
toJson.Asset class, removed {Build,Link}Output.assets*.
Hook writers should now use e.g. output.dataAssets.add(DataAsset(...))
instead of output.addAsset(DataAsset(...)).Add URI for the recorded usages file to the LinkConfig.
LinkConfig.build and link methods.Fix some more cases of: BuildConfig.dependencies and LinkConfig.dependencies no longer have to specify Dart sources.
BuildConfig.dependencies and
LinkConfig.dependencies no longer have to specify Dart sources.DataAsset examples report all assets from assets/ dir and default the
asset names to the path inside the package.package:native_assets_cli/test.dart with testBuildHook helper method
for testing build hooks.package:native_assets_cli/locking.dart with runUnderDirectoryLock.- Deprecate metadata concept.
BuildConfig.dependencies and LinkConfig.dependencies no longer have to specify Dart sources.
BuildConfig.dependencies and LinkConfig.dependencies no longer have to
specify Dart sources.BuildConfig constructors now have a required linkingEnabled parameter.
BuildConfig constructors now have a required linkingEnabled parameter.Introduce Builder and Linker interface.
Builder and Linker interface.resources.json to the build directory.HookConfig.targetIosSdk and HookConfig.targetMacosSdk optional
values.Add support for hook/link.dart.
hook/link.dart.Update documentation about providing NativeCodeAsset.file in dry runs.
NativeCodeAsset.file in dry runs.Fix V1_0_0 dry run backwards compatibility. https://github.com/dart-lang/native/issues/1053
- Fix test.
Update documentation about providing NativeCodeAsset.file in dry runs. https://github.com/dart-lang/native/issues/1049
NativeCodeAsset.file in dry runs.
https://github.com/dart-lang/native/issues/1049Breaking change Completely rewritten API. https://github.com/dart-lang/native/pull/946
build.dart to hook/build.dart.
https://github.com/dart-lang/native/issues/823Fix dartdoc generation. Hide the implementation details.
Breaking change Removed all code not used in build.dart scripts out of the public API.
build.dart scripts out of
the public API.Breaking change Moved code not used in build.dart to package:native_assets_builder.
dart_api_dl.h from the Dart SDK in native code.build.dart to
package:native_assets_builder.Fixed an issue where Depenendencies.dependencies could not be modified when expected to.
Depenendencies.dependencies could not be
modified when expected to.Documentation updates.
Fix extensions of nested types to use fully qualified generated wrapper names.
Bump ffigen and swift2objc versions.
- Initial version.
Your coding agent can read these notes before it upgrades. Set up the MCP server →