Skip to content

Commit

Permalink
[native_assets_builder] Hide KernelAssets field (#967)
Browse files Browse the repository at this point in the history
  • Loading branch information
dcharkes authored Feb 14, 2024
1 parent f0c96cc commit afa1cce
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions pkgs/native_assets_builder/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.5.0

- **Breaking change**: Hide implementation of `KernelAssets`.

## 0.4.0

- **Breaking change**: Split out the `KernelAsset`s from normal `Asset`s.
Expand Down
6 changes: 3 additions & 3 deletions pkgs/native_assets_builder/lib/src/model/kernel_assets.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ import 'package:native_assets_cli/native_assets_cli_internal.dart';
import '../utils/yaml.dart';

class KernelAssets {
final List<KernelAsset> assets;
final List<KernelAsset> _assets;

KernelAssets(this.assets);
KernelAssets([Iterable<KernelAsset>? assets]) : _assets = [...?assets];

String toNativeAssetsFile() {
final assetsPerTarget = <Target, List<KernelAsset>>{};
for (final asset in assets) {
for (final asset in _assets) {
final assets = assetsPerTarget[asset.target] ?? [];
assets.add(asset);
assetsPerTarget[asset.target] = assets;
Expand Down
2 changes: 1 addition & 1 deletion pkgs/native_assets_builder/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: native_assets_builder
description: >-
This package is the backend that invokes top-level `build.dart` scripts.
version: 0.4.0
version: 0.5.0
repository: https://github.com/dart-lang/native/tree/main/pkgs/native_assets_builder

environment:
Expand Down

0 comments on commit afa1cce

Please sign in to comment.