Unverified Commit 42c9c225 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

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

This reverts commit a9a35d10.
parent a9a35d10
......@@ -453,6 +453,12 @@ 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,
);
}
_copyEngineArtifactToModule(BuildMode.debug);
copyEngineArtifactToProject(BuildMode.debug);
}
}
void _copyEngineArtifactToModule(BuildMode mode) {
void copyEngineArtifactToProject(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,9 +662,8 @@ 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(
......@@ -712,6 +711,12 @@ 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