-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[native_assets_builder] Test hooks stopping after failure (#1768)
Closes: #1630
- Loading branch information
Showing
12 changed files
with
193 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
pkgs/native_assets_builder/test_data/depend_on_fail_build/hook/build.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. 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:fail_build/fail_build.dart'; | ||
import 'package:native_assets_cli/data_assets.dart'; | ||
|
||
void main(List<String> arguments) async { | ||
await build(arguments, (config, output) async { | ||
// Does nothing, just depends on `package:fail_build`. | ||
invokeFailBuildCode(); | ||
}); | ||
} |
5 changes: 5 additions & 0 deletions
5
pkgs/native_assets_builder/test_data/depend_on_fail_build/lib/depend_on_fail_build.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
void invokeDependOnFailBuildCode() {} |
20 changes: 20 additions & 0 deletions
20
pkgs/native_assets_builder/test_data/depend_on_fail_build/pubspec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: depend_on_fail_build | ||
description: Has a dependency that fails to build. | ||
version: 0.1.0 | ||
|
||
publish_to: none | ||
|
||
environment: | ||
sdk: '>=3.3.0 <4.0.0' | ||
|
||
dependencies: | ||
fail_build: | ||
path: ../fail_build/ | ||
# native_assets_cli: ^0.9.0 | ||
native_assets_cli: | ||
path: ../../../native_assets_cli/ | ||
|
||
dev_dependencies: | ||
ffigen: ^8.0.2 | ||
lints: ^3.0.0 | ||
test: ^1.23.1 |
9 changes: 9 additions & 0 deletions
9
...ative_assets_builder/test_data/depend_on_fail_build_app/bin/depend_on_fail_build_app.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. 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:depend_on_fail_build/depend_on_fail_build.dart'; | ||
|
||
void main() { | ||
invokeDependOnFailBuildCode(); | ||
} |
20 changes: 20 additions & 0 deletions
20
pkgs/native_assets_builder/test_data/depend_on_fail_build_app/pubspec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: depend_on_fail_build_app | ||
description: Has a dependency that has a dependency that fails to build. | ||
version: 0.1.0 | ||
|
||
publish_to: none | ||
|
||
environment: | ||
sdk: '>=3.3.0 <4.0.0' | ||
|
||
dependencies: | ||
depend_on_fail_build: | ||
path: ../depend_on_fail_build/ | ||
# native_assets_cli: ^0.9.0 | ||
native_assets_cli: | ||
path: ../../../native_assets_cli/ | ||
|
||
dev_dependencies: | ||
ffigen: ^8.0.2 | ||
lints: ^3.0.0 | ||
test: ^1.23.1 |
10 changes: 10 additions & 0 deletions
10
pkgs/native_assets_builder/test_data/fail_build/hook/build.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'dart:io'; | ||
|
||
void main(List<String> arguments) async { | ||
print('Just here to fail the build!'); | ||
exit(1); | ||
} |
5 changes: 5 additions & 0 deletions
5
pkgs/native_assets_builder/test_data/fail_build/lib/fail_build.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
void invokeFailBuildCode() {} |
18 changes: 18 additions & 0 deletions
18
pkgs/native_assets_builder/test_data/fail_build/pubspec.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: fail_build | ||
description: Always fails to build | ||
version: 0.1.0 | ||
|
||
publish_to: none | ||
|
||
environment: | ||
sdk: '>=3.3.0 <4.0.0' | ||
|
||
dependencies: | ||
# native_assets_cli: ^0.9.0 | ||
native_assets_cli: | ||
path: ../../../native_assets_cli/ | ||
|
||
dev_dependencies: | ||
ffigen: ^8.0.2 | ||
lints: ^3.0.0 | ||
test: ^1.23.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters