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

Stop extra framework copy during build ios-framework (#70790)

parent cfb63356
......@@ -453,12 +453,6 @@ end
' ├─Building plugins...'
);
try {
// Regardless of the last "flutter build" build mode,
// copy the corresponding engine.
// A plugin framework built with bitcode must link against the bitcode version
// of Flutter.framework (Release).
_project.ios.copyEngineArtifactToProject(mode);
final String bitcodeGenerationMode = mode == BuildMode.release ?
'bitcode' : 'marker'; // In release, force bitcode embedding without archiving.
......
......@@ -648,11 +648,11 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
ephemeralDirectory,
);
}
copyEngineArtifactToProject(BuildMode.debug);
_copyEngineArtifactToModule(BuildMode.debug);
}
}
void copyEngineArtifactToProject(BuildMode mode) {
void _copyEngineArtifactToModule(BuildMode mode) {
// Copy podspec and framework from engine cache. The actual build mode
// doesn't actually matter as it will be overwritten by xcode_backend.sh.
// However, cocoapods will run before that script and requires something
......@@ -662,8 +662,9 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
Artifact.flutterFramework,
platform: TargetPlatform.ios,
mode: mode,
)
);
));
final Directory engineCopyDirectory =
ephemeralDirectory.childDirectory('Flutter').childDirectory('engine');
if (framework.existsSync()) {
final File podspec = framework.parent.childFile('Flutter.podspec');
globals.fsUtils.copyDirectorySync(
......@@ -711,12 +712,6 @@ class IosProject extends FlutterProjectPlatform implements XcodeBasedProject {
return registryDirectory.childFile('GeneratedPluginRegistrant.m');
}
Directory get engineCopyDirectory {
return isModule
? ephemeralDirectory.childDirectory('Flutter').childDirectory('engine')
: hostAppRoot.childDirectory('Flutter');
}
Future<void> _overwriteFromTemplate(String path, Directory target) async {
final Template template = await Template.fromName(
path,
......
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