[native_assets] Roll dependencies (#166282)

Updating the dart-lang/native dependencies to the ones published today.

No functional changes, but `CodeAsset` does not expose an `architecture`
and `os ` anymore (https://github.com/dart-lang/native/issues/2127).
Instead these should be taken from what is passed in for the
`CodeConfig`. This PR refactors the `DartBuildResult` to carry around
the `Target` with `CodeAsset`s as `FlutterCodeAsset`s.

(This PR avoid refactoring relevant code due to
https://github.com/flutter/flutter/pull/164094 already refactoring this
code.)
This commit is contained in:
Daco Harkes
2025-04-03 07:42:31 +02:00
committed by GitHub
parent b85c0fc2fe
commit dec31cbab6
12 changed files with 158 additions and 131 deletions

View File

@@ -9,7 +9,7 @@ import 'package:native_toolchain_c/native_toolchain_c.dart';
void main(List<String> args) async {
await build(args, (BuildInput input, BuildOutputBuilder output) async {
if (!input.config.buildAssetTypes.contains(CodeAsset.type)) {
if (!input.config.buildCodeAssets) {
return;
}

View File

@@ -6,7 +6,7 @@ import 'package:native_assets_cli/code_assets.dart';
void main(List<String> args) async {
await link(args, (LinkInput input, LinkOutputBuilder output) async {
if (!input.config.buildAssetTypes.contains(CodeAsset.type)) {
if (!input.config.buildCodeAssets) {
return;
}
final CodeAsset asset = input.assets.code.single;
@@ -17,8 +17,8 @@ void main(List<String> args) async {
// Change the asset id to something that is used.
name: '${packageName}_bindings_generated.dart',
linkMode: asset.linkMode,
os: asset.os,
architecture: asset.architecture,
os: input.config.code.targetOS,
architecture: input.config.code.targetArchitecture,
file: asset.file,
),
);

View File

@@ -7,8 +7,8 @@ environment:
dependencies:
logging: 1.3.0
native_assets_cli: 0.12.0
native_toolchain_c: 0.9.0
native_assets_cli: 0.13.0
native_toolchain_c: 0.10.0
async: 2.13.0 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
collection: 1.19.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
@@ -68,4 +68,4 @@ dev_dependencies:
webkit_inspection_protocol: 1.2.1 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
yaml_edit: 2.2.2 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
# PUBSPEC CHECKSUM: 2038
# PUBSPEC CHECKSUM: a861