@@ -8,6 +8,7 @@ import 'package:flutter_devicelab/framework/framework.dart';
8
8
import 'package:flutter_devicelab/framework/task_result.dart' ;
9
9
import 'package:flutter_devicelab/framework/utils.dart' ;
10
10
import 'package:path/path.dart' as path;
11
+ import 'package:yaml_edit/yaml_edit.dart' ;
11
12
12
13
Future <void > main () async {
13
14
await task (() async {
@@ -16,16 +17,25 @@ Future<void> main() async {
16
17
final Directory tempDir = Directory .systemTemp.createTempSync (
17
18
'flutter_ios_app_with_extensions_test.' ,
18
19
);
19
- final Directory projectDir = Directory (path.join (tempDir.path, 'app_with_extensions' ));
20
+ final Directory rootDir = Directory (path.join (tempDir.path, 'app_workspace' ));
21
+ final Directory projectDir = Directory (path.join (rootDir.path, 'app_with_extensions' ));
20
22
try {
21
- mkdir (projectDir);
23
+ mkdirs (projectDir);
22
24
recursiveCopy (
23
25
Directory (
24
26
path.join (flutterDirectory.path, 'dev' , 'integration_tests' , 'ios_app_with_extensions' ),
25
27
),
26
28
projectDir,
27
29
);
28
30
31
+ final String rootPubspec =
32
+ File (path.join (flutterDirectory.path, 'pubspec.yaml' )).readAsStringSync ();
33
+ final YamlEditor yamlEditor = YamlEditor (rootPubspec);
34
+ yamlEditor.update (< String > ['workspace' ], < String > ['app_with_extensions' ]);
35
+ File (path.join (rootDir.path, 'pubspec.yaml' ))
36
+ ..createSync ()
37
+ ..writeAsStringSync (yamlEditor.toString ());
38
+
29
39
section ('Create release build' );
30
40
31
41
// This attempts to build the companion watchOS app. However, the watchOS
0 commit comments