PackageTrack
Sign in Get early access

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
Release Pre-release Withdrawn

Releases

latest 31
  1. 0.18.0 29 Apr 2025
    Release notes
    • Breaking change Reorganized the libraries structure. Classes are no longer exported multiple times.
    • Breaking change multiple classes renamed.
    Open source →
  2. 0.17.0 23 Apr 2025
    Release notes
    • 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
    Open source →
  3. 0.16.0 16 Apr 2025
    Release notes
    • Support relative paths in user-defines to be loaded as absolute paths.
    Open source →
  4. 0.15.0 15 Apr 2025
    Release notes
    • 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)
    Open source →
  5. 0.15.0-0 11 Apr 2025 pre-release

    Nothing published for this version

  6. 0.14.0 08 Apr 2025
    Release notes
    • Added support for sending assets between build hooks via the ToBuild Routing. This replaces the deprecated Metadata.
    • Added support for user-defines.
    Open source →
  7. 0.13.0 31 Mar 2025
    Release notes
    • Breaking change Removed CodeAsset.type, use EncodedAsset.isCodeAsset instead.
    • Breaking change: Removed 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.
    • Another overhaul of the JSON encoding. (Old encoding still read and emitted for the time being).
    Open source →
  8. 0.12.0 20 Mar 2025
    Release notes
    • Added validation that all URLs in the Input and Output of hooks are absolute.
    • Added addDataAssetDirectories extension method on BuildOutputBuilder.
    • Replaced JSON serialization/deserialization logic with code generated from the JSON schemas documenting the protocol.
    Open source →
  9. 0.11.0 22 Jan 2025
    Release notes
    • 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 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.
    • Breaking change The output.json is now part of BuildInput.
    Open source →
  10. 0.10.0 20 Dec 2024
    Release notes
    • Breaking change The library import paths changed to be per asset type. (This enables extensibility with custom asset types.)
    • Breaking change: Rename 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.
    • Breaking change Move 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.
    • Breaking change Move HookConfig.targetOS to CodeConfig. DataAssets and other asset types should not depend on OS for now.
    • Breaking change: Change the behavior of testBuildHook and testCodeBuildHook; instead of defining tests, these methods should now be called from within tests.
    • Move the package:test dependency from a regular dependency (exported to calling packages) to a dev_dependency.
    Open source →
  11. 0.9.0 04 Nov 2024
    Release notes
    • Add BuildConfig and LinkConfig outputDirectoryShared.
    • Remove package:native_assets_cli/locking.dart with runUnderDirectoryLock. Hook writers should not use this, the native_assets_builder does 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_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)
    • Use DART_HOOK_TESTING prefix for environment variables used for testing on Dart CI
    • No longer try to resolve uris encoded in config.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)
    • Breaking change Moved some methods to be extension methods.
    • Some classes in the BuildConfig and BuildOutput now expose fromJson and toJson.
    • Breaking change Removed Asset class, removed {Build,Link}Output.assets*. Hook writers should now use e.g. output.dataAssets.add(DataAsset(...)) instead of output.addAsset(DataAsset(...)).
    • Breaking change Introduce builder classes that construct hook configs and hook outputs.
    Open source →
  12. 0.8.0 13 Sep 2024
    Release notes
    • Add URI for the recorded usages file to the LinkConfig.
    • Added a validation step in the build and link methods.
    Open source →
  13. 0.7.3 02 Sep 2024
    Release notes
    • Fix some more cases of: 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.
    • Add package:native_assets_cli/test.dart with testBuildHook helper method for testing build hooks.
    • Add package:native_assets_cli/locking.dart with runUnderDirectoryLock.
    Open source →
  14. 0.7.2 15 Jul 2024
    Release notes
    • Deprecate metadata concept.
    Open source →
  15. 0.7.1 12 Jul 2024
    Release notes
    • BuildConfig.dependencies and LinkConfig.dependencies no longer have to specify Dart sources.
    Open source →
  16. 0.7.0 10 Jul 2024
    Release notes
    • BuildConfig constructors now have a required linkingEnabled parameter.
    Open source →
  17. 0.6.1 05 Jul 2024
    Release notes
    • Introduce Builder and Linker interface.
    • Copy resources.json to the build directory.
    • Introduce HookConfig.targetIosSdk and HookConfig.targetMacosSdk optional values.
    Open source →
  18. 0.6.0 16 May 2024
    Release notes
    • Add support for hook/link.dart.
    Open source →
  19. 0.5.4 26 Mar 2024
    Release notes
    • Update documentation about providing NativeCodeAsset.file in dry runs.
    Open source →
  20. 0.5.3 25 Mar 2024
    Release notes
    • Fix V1_0_0 dry run backwards compatibility. https://github.com/dart-lang/native/issues/1053
    Open source →
  21. 0.5.2 22 Mar 2024
    Release notes
    • Fix test.
    Open source →
  22. 0.5.1 22 Mar 2024
    Release notes
    • Update documentation about providing NativeCodeAsset.file in dry runs. https://github.com/dart-lang/native/issues/1049
    Open source →
  23. 0.5.0 22 Mar 2024
    Release notes
    • Breaking change Completely rewritten API. https://github.com/dart-lang/native/pull/946
    • Breaking change Move build.dart to hook/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.
    Open source →
  24. 0.4.2 22 Jan 2024
    Release notes
    • Fix dartdoc generation. Hide the implementation details.
    Open source →
  25. 0.4.1 15 Jan 2024
    Release notes
    • Breaking change Removed all code not used in build.dart scripts out of the public API.
    Open source →
  26. 0.4.0 11 Jan 2024
    Release notes
    • Added example/use_dart_api/ detailing how to use dart_api_dl.h from the Dart SDK in native code.
    • Breaking change Moved code not used in build.dart to package:native_assets_builder.
    Open source →
  27. 0.3.2 27 Oct 2023
    Release notes
    • Fixed an issue where Depenendencies.dependencies could not be modified when expected to.
    Open source →
  28. 0.3.1 27 Oct 2023 withdrawn
    Release notes
    • Added Target.androidRiscv64.
    Open source →
  29. 0.3.0 03 Oct 2023
    Release notes
    • Breaking change Add required BuildConfig.packageName (#142).
    Open source →
  30. 0.2.0 07 Aug 2023
    Release notes
    • Breaking change Rename Asset.name to Asset.id (#100).
    • Added topics.
    • Fixed metadata example.
    • Throws FormatExceptions instead of TypeErrors when failing to parse Yaml (#109).
    Open source →
  31. 0.1.0 11 Jul 2023
    Release notes
    • Initial version.
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive