hooks 0.20.4
hooks: ^0.20.4 copied to clipboard
A library that contains a Dart API for the JSON-based protocol for `hook/build.dart` and `hook/link.dart`.
0.20.4 #
- Improved documentation on debugging and added a documentation index.
0.20.3 #
- Polished README.md, Dartdocs, and examples.
0.20.2 #
- Change the length of the checksum used for
outputDirectoryto 10 hexadecimal characters to avoid running out of path length on Windows.
0.20.1 #
- Update outdated documentation.
- Deprecate
HookOutputBuilder.addDependencyandHookOutputBuilder.addDependenciesin favor ofHookOutputBuilder.dependencies.addandHookOutputBuilder.dependencies.addAll.
0.20.0 #
- Breaking change Rename
EncodedAsset.jsonPathtoEncodedAsset.encodingJsonPath. This field only governs theEncodedAsset.encodingfield, not the whole object. - Enable passing metadata from link hooks of a package to the link hooks in dependencies, by fixing the link hook execution order.
0.19.5 #
- Stop leaking unexported symbols.
0.19.4 #
- Add doc comments to all public members.
0.19.3 #
- Mark this package as in preview.
0.19.1 #
- Added links to the
buildandlinkmethods as primary entry points. - Added failure outputs and documented exit codes.
0.19.0 #
- Split up
package:native_assets_cliinpackage:hooks,package:code_assets, andpackage:data_assets.
0.18.0 #
- Breaking change Reorganized the libraries structure. Classes are no longer exported multiple times.
- Breaking change multiple classes renamed.
0.17.0 #
- 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.0 #
- Support relative paths in user-defines to be loaded as absolute paths.
0.15.0 #
- 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.14.0 #
- Added support for sending assets between build hooks via the
ToBuildRouting. This replaces the deprecatedMetadata. - Added support for user-defines.
0.13.0 #
- 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).
0.12.0 #
- 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.
0.11.0 #
- 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.
0.10.0 #
- 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.0 #
- 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.
0.8.0 #
- Add URI for the recorded usages file to the
LinkConfig. - Added a validation step in the
buildandlinkmethods.
0.7.3 #
- 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.
0.7.2 #
- Deprecate metadata concept.
0.7.1 #
BuildConfig.dependenciesandLinkConfig.dependenciesno longer have to specify Dart sources.
0.7.0 #
BuildConfigconstructors now have a requiredlinkingEnabledparameter.
0.6.1 #
- Introduce
BuilderandLinkerinterface. - Copy
resources.jsonto the build directory. - Introduce
HookConfig.targetIosSdkandHookConfig.targetMacosSdkoptional values.
0.6.0 #
- Add support for
hook/link.dart.
0.5.4 #
- Update documentation about providing
NativeCodeAsset.filein dry runs.
0.5.3 #
- Fix V1_0_0 dry run backwards compatibility. https://github.com/dart-lang/native/issues/1053
0.5.2 #
- Fix test.
0.5.1 #
- Update documentation about providing
NativeCodeAsset.filein dry runs. https://github.com/dart-lang/native/issues/1049
0.5.0 #
- 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.2 #
- Fix dartdoc generation. Hide the implementation details.
0.4.1 #
- Breaking change Removed all code not used in
build.dartscripts out of the public API.
0.4.0 #
- 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.
0.3.2 #
- Fixed an issue where
Depenendencies.dependenciescould not be modified when expected to.
0.3.1 #
- Added
Target.androidRiscv64.
0.2.0 #
0.1.0 #
- Initial version.