[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user