code_assets library

Code asset support for hook authors.

Classes

AndroidCodeConfig
The configuration for CodeAssets for target OS OS.android in CodeConfig.android.
Architecture
A hardware architecture which the Dart VM can run on.
BuildOutputCodeAssetBuilder
Extension on BuildOutputBuilder to add CodeAssets.
CCompilerConfig
The configuration for a C toolchain inside CodeConfig.cCompiler.
CodeAsset
An asset containing executable code which respects the native application binary interface (ABI).
CodeAssetExtension
The protocol extension for the hook/build.dart and hook/link.dart with CodeAssets and CodeConfig.
CodeConfig
The configuration for CodeAssets in HookConfig.
DeveloperCommandPrompt
The configuration for the Windows Developer Command Prompt in WindowsCCompilerConfig.developerCommandPrompt.
DynamicLoadingBundled
CodeAssets with this LinkMode will be bundled as dynamic libraries by Dart/Flutter at build time.
DynamicLoadingSystem
CodeAssets with this LinkMode are expected to be available as dynamic library on the target system PATH.
IOSCodeConfig
The configuration for CodeAssets for target OS OS.iOS in CodeConfig.iOS.
IOSSdk
The iOS SDK (device or simulator) in IOSCodeConfig.targetSdk.
LinkMode
The link mode for a CodeAsset.
LinkModePreference
The preferred link mode for CodeAssets in CodeConfig.linkModePreference.
LinkOutputCodeAssetBuilder
Extension on LinkOutputBuilder to add CodeAssets.
LookupInExecutable
CodeAssets with this LinkMode are expected to have their symbols available through DynamicLibrary.executable().
LookupInProcess
CodeAssets with this LinkMode are expected to have their symbols available through DynamicLibrary.process().
MacOSCodeConfig
The configuration for CodeAssets for target OS OS.macOS in CodeConfig.macOS.
OS
An operating system which the Dart VM can run on.
StaticLinking
CodeAssets with this LinkMode are linked statically.
WindowsCCompilerConfig
The configuration provided in CCompilerConfig.windows when CodeConfig.targetOS is OS.windows.

Extensions

BuildOutputAssetsBuilderCode on BuildOutputAssetsBuilder
Extension on BuildOutputBuilder to add CodeAssets.
BuildOutputCodeAssets on BuildOutputAssets
The CodeAssets in BuildOutputAssets.encodedAssets.
EncodedCodeAsset on EncodedAsset
Methods on EncodedAsset for CodeAssets.
HookConfigCodeConfig on HookConfig
Extension to the HookConfig providing access to configuration specific to code assets (only available if code assets are supported).
LinkInputCodeAssets on LinkInputAssets
Extension to the LinkInput providing access to configuration specific to code assets as well as code asset inputs to the linker (only available if code assets are supported).
LinkOutputAssetsBuilderCode on LinkOutputAssetsBuilder
Extension on LinkOutputBuilder to add CodeAssets.
LinkOutputCodeAssets on LinkOutputAssets
The CodeAssets in LinkOutputAssets.encodedAssets.
OSLibraryNaming on OS

Functions

testCodeBuildHook({required FutureOr<void> mainMethod(List<String> arguments), required FutureOr<void> check(BuildInput, BuildOutput), bool? linkingEnabled, Architecture? targetArchitecture, OS? targetOS, IOSSdk? targetIOSSdk = IOSSdk.iPhoneOS, int? targetIOSVersion = 17, int? targetMacOSVersion = 13, int? targetAndroidNdkApi = 30, CCompilerConfig? cCompiler, LinkModePreference? linkModePreference = LinkModePreference.dynamic, PackageUserDefines? userDefines, Map<String, List<EncodedAsset>>? assets}) Future<void>
Tests the main function of a hook/build.dart with CodeAssets.