File tree 2 files changed +13
-0
lines changed
pkgs/native_assets_cli/lib/src/api
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import '../validation.dart';
11
11
12
12
/// Runs a native assets build.
13
13
///
14
+ /// Meant to be used in build hooks (`hook/build.dart` ).
15
+ ///
14
16
/// Can build native assets which are not already available, or expose existing
15
17
/// files. Each individual asset is assigned a unique asset ID.
16
18
///
@@ -87,6 +89,11 @@ import '../validation.dart';
87
89
/// });
88
90
/// }
89
91
/// ```
92
+ ///
93
+ /// If the [builder] fails, it must `throw` . Build hooks are guaranteed to be
94
+ /// invoked with a process invocation and should return a non-zero exit code on
95
+ /// failure. Throwing will lead to an uncaught exception, causing a non-zero
96
+ /// exit code.
90
97
Future <void > build (
91
98
List <String > arguments,
92
99
Future <void > Function (BuildConfig config, BuildOutputBuilder output) builder,
Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ import '../validation.dart';
11
11
12
12
/// Runs a native assets link.
13
13
///
14
+ /// Meant to be used in link hooks (`hook/link.dart` ).
15
+ ///
14
16
/// Can link native assets which are not already available, or expose existing
15
17
/// files. Each individual asset is assigned a unique asset ID.
16
18
///
@@ -30,6 +32,10 @@ import '../validation.dart';
30
32
/// });
31
33
/// }
32
34
/// ```
35
+ /// If the [linker] fails, it must `throw` . Link hooks are guaranteed to be
36
+ /// invoked with a process invocation and should return a non-zero exit code on
37
+ /// failure. Throwing will lead to an uncaught exception, causing a non-zero
38
+ /// exit code.
33
39
Future <void > link (
34
40
List <String > arguments,
35
41
Future <void > Function (LinkConfig config, LinkOutputBuilder output) linker,
You can’t perform that action at this time.
0 commit comments