native_assets_cli
A library that contains the argument and file formats for implementing a native assets CLI.
0.18.0
1.0M downloads/mo
#356 most downloaded on pub.dev
dart-lang/native
What this package is like to depend on
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
0 releases in the last 12 months
see the full history below
Release timeline
31 releases · Jul 2023 to Apr 2025
2024
2025
2026
Releases
latest 31-
0.18.029 Apr 2025Release notes
Open source →- Breaking change Reorganized the libraries structure. Classes are no longer exported multiple times.
- Breaking change multiple classes renamed.
-
0.17.023 Apr 2025Release notes
Open source →- 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
-
0.16.016 Apr 2025 -
0.15.015 Apr 2025Release notes
Open source →- Breaking change JSON encoding migration: change written asset type to the namespaced one. Still keep reading the old one. (Old build hooks will keep working with new SDKs.)
- Bump SDK lower bound to version that understands namespaced asset types. (Version 3.8.0-260.0.dev)
-
0.15.0-011 Apr 2025 pre-releaseNothing published for this version
-
0.14.008 Apr 2025Release notes
Open source →- Added support for sending assets between build hooks via the
ToBuildRouting. This replaces the deprecatedMetadata. - Added support for user-defines.
- Added support for sending assets between build hooks via the
-
0.13.031 Mar 2025Release notes
Open source →- Breaking change Removed
CodeAsset.type, useEncodedAsset.isCodeAssetinstead. - Breaking change: Removed
CodeAsset.osandCodeAsset.architecture. UseCodeConfig.targetOSandCodeConfig.targetArchitectureinstead. HookInput.outputDirectoryis now based onHookInput.outputDirectoryShared. TheoutputDirectorynow creates its own subdirectory insideoutputDirectoryShared.- Another overhaul of the JSON encoding. (Old encoding still read and emitted for the time being).
- Breaking change Removed
-
0.12.020 Mar 2025Release notes
Open source →- Added validation that all URLs in the
InputandOutputof hooks are absolute. - Added
addDataAssetDirectoriesextension method onBuildOutputBuilder. - Replaced JSON serialization/deserialization logic with code generated from the JSON schemas documenting the protocol.
- Added validation that all URLs in the
-
0.11.022 Jan 2025Release notes
Open source →- Breaking change Complete overhaul of the API used in build and link hooks.
The
BuildConfigis now split inBuildInputandBuildConfig. 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. TheoutputDirectoryis the same if the config is the same. - Breaking change The
output.jsonis now part ofBuildInput.
- Breaking change Complete overhaul of the API used in build and link hooks.
The
-
0.10.020 Dec 2024Release notes
Open source →- Breaking change The library import paths changed to be per asset type. (This enables extensibility with custom asset types.)
- Breaking change: Rename
supportedAssetTypestobuildAssetTypes. 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. - Breaking change Move
BuildModetopackage:native_toolchain_c. This way it can be controlled in the build hook together with theOptimizationLevel. Most likely, every package should ship withrelease.BuildMode.debugshould only be used while developing the package locally. - Breaking change Move
HookConfig.targetOStoCodeConfig.DataAssets and other asset types should not depend on OS for now. - Breaking change: Change the behavior of
testBuildHookandtestCodeBuildHook; instead of defining tests, these methods should now be called from within tests. - Move the
package:testdependency from a regular dependency (exported to calling packages) to a dev_dependency.
-
0.9.004 Nov 2024Release notes
Open source →- Add
BuildConfigandLinkConfigoutputDirectoryShared. - Remove
package:native_assets_cli/locking.dartwithrunUnderDirectoryLock. Hook writers should not use this, thenative_assets_builderdoes this. - Fix example packages with RecordUse annotations #1586.
- Remove v1.0 / v1.1 related serialization
- Update SDK constraint to 3.5.0+
- Remove (deprecated) support for accepting yaml as config
- Remove usage of
package:cli_configandpackage: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) - Use
DART_HOOK_TESTINGprefix for environment variables used for testing on Dart CI - No longer try to resolve uris encoded in
config.jsonagainst any base uri. Thehook/{build,link}.dartinvoker has to ensure the uris it encodes can be opened as-is (i.e. without resolving against any base uri) - Breaking change Moved some methods to be extension methods.
- Some classes in the
BuildConfigandBuildOutputnow exposefromJsonandtoJson. - Breaking change Removed
Assetclass, removed{Build,Link}Output.assets*. Hook writers should now use e.g.output.dataAssets.add(DataAsset(...))instead ofoutput.addAsset(DataAsset(...)). - Breaking change Introduce builder classes that construct hook configs and hook outputs.
- Add
-
0.8.013 Sep 2024Release notes
Open source →- Add URI for the recorded usages file to the
LinkConfig. - Added a validation step in the
buildandlinkmethods.
- Add URI for the recorded usages file to the
-
0.7.302 Sep 2024Release notes
Open source →- Fix some more cases of:
BuildConfig.dependenciesandLinkConfig.dependenciesno longer have to specify Dart sources. DataAssetexamples report all assets fromassets/dir and default the asset names to the path inside the package.- Add
package:native_assets_cli/test.dartwithtestBuildHookhelper method for testing build hooks. - Add
package:native_assets_cli/locking.dartwithrunUnderDirectoryLock.
- Fix some more cases of:
-
0.7.215 Jul 2024 -
0.7.112 Jul 2024Release notes
Open source →BuildConfig.dependenciesandLinkConfig.dependenciesno longer have to specify Dart sources.
-
0.7.010 Jul 2024 -
0.6.105 Jul 2024Release notes
Open source →- Introduce
BuilderandLinkerinterface. - Copy
resources.jsonto the build directory. - Introduce
HookConfig.targetIosSdkandHookConfig.targetMacosSdkoptional values.
- Introduce
-
0.6.016 May 2024 -
0.5.426 Mar 2024 -
0.5.325 Mar 2024Release notes
Open source →- Fix V1_0_0 dry run backwards compatibility. https://github.com/dart-lang/native/issues/1053
-
0.5.222 Mar 2024 -
0.5.122 Mar 2024Release notes
Open source →- Update documentation about providing
NativeCodeAsset.filein dry runs. https://github.com/dart-lang/native/issues/1049
- Update documentation about providing
-
0.5.022 Mar 2024Release notes
Open source →- Breaking change Completely rewritten API. https://github.com/dart-lang/native/pull/946
- Breaking change Move
build.darttohook/build.dart. https://github.com/dart-lang/native/issues/823 - Breaking change Use JSON instead of YAML in the protocol. https://github.com/dart-lang/native/issues/991
- Bump examples dependencies to path dependencies.
-
0.4.222 Jan 2024 -
0.4.115 Jan 2024Release notes
Open source →- Breaking change Removed all code not used in
build.dartscripts out of the public API.
- Breaking change Removed all code not used in
-
0.4.011 Jan 2024Release notes
Open source →- Added example/use_dart_api/ detailing how to use
dart_api_dl.hfrom the Dart SDK in native code. - Breaking change Moved code not used in
build.darttopackage:native_assets_builder.
- Added example/use_dart_api/ detailing how to use
-
0.3.227 Oct 2023Release notes
Open source →- Fixed an issue where
Depenendencies.dependenciescould not be modified when expected to.
- Fixed an issue where
-
0.3.127 Oct 2023 withdrawn -
0.3.003 Oct 2023 -
0.2.007 Aug 2023 -
0.1.011 Jul 2023