@@ -10,7 +10,8 @@ import 'utils_local.dart' as local_utils;
10
10
/// - Path to the root of the Monarch repo
11
11
/// - Path to the Flutter SDK to use
12
12
/// - Path to the monarch_ui/{flutter_id} output directory
13
- void buildPreviewApi (String repo_root, String flutter_sdk, String out_ui_flutter_id) {
13
+ void buildPreviewApi (
14
+ String repo_root, String flutter_sdk, String out_ui_flutter_id) {
14
15
var repo_paths = RepoPaths (repo_root);
15
16
16
17
print ('''
@@ -32,11 +33,10 @@ Building Monarch Preview API using these arguments:
32
33
out_preview_api_dir.deleteSync (recursive: true );
33
34
out_preview_api_dir.createSync (recursive: true );
34
35
36
+ var dartVersion = pub.Version .parse (get_dart_version (flutter_sdk));
37
+ var dart3 = pub.Version (3 , 0 , 0 );
35
38
36
- var flutterVersion = pub.Version .parse (get_flutter_version (flutter_sdk));
37
- var flutterVersionWithDart3 = pub.Version (3 , 8 , 0 , pre: '10.1.pre' );
38
-
39
- var useGrpc310 = flutterVersion < flutterVersionWithDart3;
39
+ var useGrpc310 = dartVersion < dart3;
40
40
if (useGrpc310) {
41
41
print ('Running `git apply grpc_310.patch`\n ' );
42
42
utils.gitApplyPatch (repo_paths.preview_api, 'grpc_310.patch' );
@@ -81,7 +81,8 @@ Building monarch preview_api flutter bundle. Will output to:
81
81
}
82
82
83
83
{
84
- var icudtl_dat_ = icudtl_dat (flutter_sdk, local_utils.read_target_platform ());
84
+ var icudtl_dat_ =
85
+ icudtl_dat (flutter_sdk, local_utils.read_target_platform ());
85
86
86
87
if (Platform .isWindows) {
87
88
var result = Process .runSync (
@@ -109,4 +110,3 @@ Building monarch preview_api flutter bundle. Will output to:
109
110
===============================================================================
110
111
''' );
111
112
}
112
-
0 commit comments