Unverified Commit e2642fd6 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Do not delete output directory during flutter build ios-framework (#45740)

parent f2445002
...@@ -148,10 +148,6 @@ class BuildIOSFrameworkCommand extends BuildSubCommand { ...@@ -148,10 +148,6 @@ class BuildIOSFrameworkCommand extends BuildSubCommand {
final Directory outputDirectory = fs.directory(fs.path.normalize(outputArgument)); final Directory outputDirectory = fs.directory(fs.path.normalize(outputArgument));
if (outputDirectory.existsSync()) {
outputDirectory.deleteSync(recursive: true);
}
aotBuilder ??= AotBuilder(); aotBuilder ??= AotBuilder();
bundleBuilder ??= BundleBuilder(); bundleBuilder ??= BundleBuilder();
...@@ -159,6 +155,10 @@ class BuildIOSFrameworkCommand extends BuildSubCommand { ...@@ -159,6 +155,10 @@ class BuildIOSFrameworkCommand extends BuildSubCommand {
printStatus('Building framework for $iosProject in ${getNameForBuildMode(mode)} mode...'); printStatus('Building framework for $iosProject in ${getNameForBuildMode(mode)} mode...');
final String xcodeBuildConfiguration = toTitleCase(getNameForBuildMode(mode)); final String xcodeBuildConfiguration = toTitleCase(getNameForBuildMode(mode));
final Directory modeDirectory = outputDirectory.childDirectory(xcodeBuildConfiguration); final Directory modeDirectory = outputDirectory.childDirectory(xcodeBuildConfiguration);
if (modeDirectory.existsSync()) {
modeDirectory.deleteSync(recursive: true);
}
final Directory iPhoneBuildOutput = modeDirectory.childDirectory('iphoneos'); final Directory iPhoneBuildOutput = modeDirectory.childDirectory('iphoneos');
final Directory simulatorBuildOutput = modeDirectory.childDirectory('iphonesimulator'); final Directory simulatorBuildOutput = modeDirectory.childDirectory('iphonesimulator');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment