Unverified Commit 9d291084 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Remove App.framework copy during build ios-framework (#49321)

parent 7915e58f
...@@ -326,17 +326,17 @@ end ...@@ -326,17 +326,17 @@ end
Future<void> _produceAppFramework(BuildMode mode, Directory iPhoneBuildOutput, Directory simulatorBuildOutput, Directory modeDirectory) async { Future<void> _produceAppFramework(BuildMode mode, Directory iPhoneBuildOutput, Directory simulatorBuildOutput, Directory modeDirectory) async {
const String appFrameworkName = 'App.framework'; const String appFrameworkName = 'App.framework';
final Directory destinationAppFrameworkDirectory = modeDirectory.childDirectory(appFrameworkName); final Directory destinationAppFrameworkDirectory = modeDirectory.childDirectory(appFrameworkName);
destinationAppFrameworkDirectory.createSync(recursive: true);
if (mode == BuildMode.debug) { if (mode == BuildMode.debug) {
final Status status = globals.logger.startProgress(' ├─Adding placeholder App.framework for debug...', timeout: timeoutConfiguration.fastOperation); final Status status = globals.logger.startProgress(' ├─Adding placeholder App.framework for debug...', timeout: timeoutConfiguration.fastOperation);
try { try {
destinationAppFrameworkDirectory.createSync(recursive: true);
await _produceStubAppFrameworkIfNeeded(mode, iPhoneBuildOutput, simulatorBuildOutput, destinationAppFrameworkDirectory); await _produceStubAppFrameworkIfNeeded(mode, iPhoneBuildOutput, simulatorBuildOutput, destinationAppFrameworkDirectory);
} finally { } finally {
status.stop(); status.stop();
} }
} else { } else {
await _produceAotAppFrameworkIfNeeded(mode, iPhoneBuildOutput, destinationAppFrameworkDirectory); await _produceAotAppFrameworkIfNeeded(mode, modeDirectory);
} }
final File sourceInfoPlist = _project.ios.hostAppRoot.childDirectory('Flutter').childFile('AppFrameworkInfo.plist'); final File sourceInfoPlist = _project.ios.hostAppRoot.childDirectory('Flutter').childFile('AppFrameworkInfo.plist');
...@@ -398,8 +398,7 @@ end ...@@ -398,8 +398,7 @@ end
Future<void> _produceAotAppFrameworkIfNeeded( Future<void> _produceAotAppFrameworkIfNeeded(
BuildMode mode, BuildMode mode,
Directory iPhoneBuildOutput, Directory destinationDirectory,
Directory destinationAppFrameworkDirectory,
) async { ) async {
if (mode == BuildMode.debug) { if (mode == BuildMode.debug) {
return; return;
...@@ -411,7 +410,7 @@ end ...@@ -411,7 +410,7 @@ end
try { try {
await aotBuilder.build( await aotBuilder.build(
platform: TargetPlatform.ios, platform: TargetPlatform.ios,
outputPath: iPhoneBuildOutput.path, outputPath: destinationDirectory.path,
buildMode: mode, buildMode: mode,
// Relative paths show noise in the compiler https://github.com/dart-lang/sdk/issues/37978. // Relative paths show noise in the compiler https://github.com/dart-lang/sdk/issues/37978.
mainDartFile: globals.fs.path.absolute(targetFile), mainDartFile: globals.fs.path.absolute(targetFile),
...@@ -421,12 +420,6 @@ end ...@@ -421,12 +420,6 @@ end
iosBuildArchs: <DarwinArch>[DarwinArch.armv7, DarwinArch.arm64], iosBuildArchs: <DarwinArch>[DarwinArch.armv7, DarwinArch.arm64],
dartDefines: dartDefines, dartDefines: dartDefines,
); );
const String appFrameworkName = 'App.framework';
fsUtils.copyDirectorySync(
iPhoneBuildOutput.childDirectory(appFrameworkName),
destinationAppFrameworkDirectory,
);
} finally { } finally {
status.stop(); status.stop();
} }
......
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