mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

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.)
27 lines
865 B
Dart
27 lines
865 B
Dart
// Copyright 2014 The Flutter Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
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.buildCodeAssets) {
|
|
return;
|
|
}
|
|
final CodeAsset asset = input.assets.code.single;
|
|
final String packageName = input.packageName;
|
|
output.assets.code.add(
|
|
CodeAsset(
|
|
package: packageName,
|
|
// Change the asset id to something that is used.
|
|
name: '${packageName}_bindings_generated.dart',
|
|
linkMode: asset.linkMode,
|
|
os: input.config.code.targetOS,
|
|
architecture: input.config.code.targetArchitecture,
|
|
file: asset.file,
|
|
),
|
|
);
|
|
});
|
|
}
|