File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/flutter_tools/lib/src/build_system/targets Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -132,14 +132,20 @@ abstract class AotAssemblyBase extends Target {
132
132
skipMissingInputs: true ,
133
133
);
134
134
135
+ // If the shorebird directory exists, delete it first.
136
+ final Directory shorebirdDir = environment.fileSystem.directory (environment.fileSystem.path.join (getIosBuildDirectory (), 'shorebird' ));
137
+ if (shorebirdDir.existsSync ()) {
138
+ shorebirdDir.deleteSync (recursive: true );
139
+ }
140
+
135
141
// Copy the class table link information (generated by gen_snapshot) from the buildOutputPath to the iOS build directory.
136
142
final File classTableLink = environment.fileSystem.file (environment.fileSystem.path.join (buildOutputPath, 'App.ct.link' ));
137
143
final File classTableLinkDebug = environment.fileSystem.file (environment.fileSystem.path.join (buildOutputPath, 'App.class_table.json' ));
138
144
if (classTableLink.existsSync ()) {
139
- classTableLink.copySync (environment.fileSystem.path.join (getIosBuildDirectory (), 'shorebird' , 'App.ct.link' ));
145
+ classTableLink.copySync (environment.fileSystem.path.join (shorebirdDir.path , 'App.ct.link' ));
140
146
}
141
147
if (classTableLinkDebug.existsSync ()) {
142
- classTableLinkDebug.copySync (environment.fileSystem.path.join (getIosBuildDirectory (), 'shorebird' , 'App.class_table.json' ));
148
+ classTableLinkDebug.copySync (environment.fileSystem.path.join (shorebirdDir.path , 'App.class_table.json' ));
143
149
}
144
150
}
145
151
}
You can’t perform that action at this time.
0 commit comments