Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/flutter_tools/lib/src/build_system/targets/ios.dart
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,20 @@ abstract class AotAssemblyBase extends Target {
skipMissingInputs: true,
);

// If the shorebird directory exists, delete it first.
final Directory shorebirdDir = environment.fileSystem.directory(environment.fileSystem.path.join(getIosBuildDirectory(), 'shorebird'));
if (shorebirdDir.existsSync()) {
shorebirdDir.deleteSync(recursive: true);
}

// Copy the class table link information (generated by gen_snapshot) from the buildOutputPath to the iOS build directory.
final File classTableLink = environment.fileSystem.file(environment.fileSystem.path.join(buildOutputPath, 'App.ct.link'));
final File classTableLinkDebug = environment.fileSystem.file(environment.fileSystem.path.join(buildOutputPath, 'App.class_table.json'));
if (classTableLink.existsSync()) {
classTableLink.copySync(environment.fileSystem.path.join(getIosBuildDirectory(), 'shorebird', 'App.ct.link'));
classTableLink.copySync(environment.fileSystem.path.join(shorebirdDir.path, 'App.ct.link'));
}
if (classTableLinkDebug.existsSync()) {
classTableLinkDebug.copySync(environment.fileSystem.path.join(getIosBuildDirectory(), 'shorebird', 'App.class_table.json'));
classTableLinkDebug.copySync(environment.fileSystem.path.join(shorebirdDir.path, 'App.class_table.json'));
}
}
}
Expand Down
Loading