Skip to content

Commit

Permalink
[native_assets_cli] Examples build.dart -> hook/build.dart (#1041)
Browse files Browse the repository at this point in the history
The changes rolled into the Dart SDK, so we can now update the examples.

(The changes have not yet been rolled into Flutter, so the examples will fail in Flutter until we do.)

* #823
  • Loading branch information
dcharkes authored Mar 22, 2024
1 parent ce0d3cd commit c3f1493
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ void main(List<String> args) async {

output.addDependencies([
assetSourcePath,
// TODO(https://github.com/dart-lang/native/issues/823): Update after
// change is rolled into Dart SDK.
config.packageRoot.resolve('build.dart'),
config.packageRoot.resolve('hook/build.dart'),
]);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ void main(List<String> args) async {
sources: [
'src/$packageName.c',
],
// TODO(https://github.com/dart-lang/native/issues/823): Update after
// change is rolled into Dart SDK.
dartBuildFiles: ['build.dart'],
dartBuildFiles: ['hook/build.dart'],
);
await cbuilder.run(
buildConfig: config,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ void main(List<String> arguments) async {
'src/$packageName.c',
'src/dart_api_dl.c',
],
// TODO(https://github.com/dart-lang/native/issues/823): Update after
// change is rolled into Dart SDK.
dartBuildFiles: ['build.dart'],
dartBuildFiles: ['hook/build.dart'],
);
await cbuilder.run(
buildConfig: config,
Expand Down
8 changes: 2 additions & 6 deletions pkgs/native_assets_cli/test/example/local_asset_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ void main() async {
final processResult = await Process.run(
dartUri.toFilePath(),
[
// TODO(https://github.com/dart-lang/native/issues/823): Update after
// change is rolled into Dart SDK.
'build.dart',
'hook/build.dart',
'-Dout_dir=${tempUri.toFilePath()}',
'-Dpackage_name=$name',
'-Dpackage_root=${testPackageUri.toFilePath()}',
Expand Down Expand Up @@ -85,9 +83,7 @@ void main() async {
dependencies,
[
testPackageUri.resolve('data/asset.txt'),
// TODO(https://github.com/dart-lang/native/issues/823): Update after
// change is rolled into Dart SDK.
testPackageUri.resolve('build.dart'),
testPackageUri.resolve('hook/build.dart'),
],
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ void main() async {
final processResult = await Process.run(
dartUri.toFilePath(),
[
// TODO(https://github.com/dart-lang/native/issues/823): Update after
// change is rolled into Dart SDK.
'build.dart',
'hook/build.dart',
'-Dout_dir=${tempUri.toFilePath()}',
'-Dpackage_name=$name',
'-Dpackage_root=${testPackageUri.toFilePath()}',
Expand Down Expand Up @@ -85,9 +83,7 @@ void main() async {
dependencies,
[
testPackageUri.resolve('src/$name.c'),
// TODO(https://github.com/dart-lang/native/issues/823): Update after
// change is rolled into Dart SDK.
testPackageUri.resolve('build.dart'),
testPackageUri.resolve('hook/build.dart'),
],
);
}
Expand Down

0 comments on commit c3f1493

Please sign in to comment.