Unverified Commit 2d862494 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

rsync Flutter.framework for add to app (#83315)

parent e566356e
...@@ -57,6 +57,8 @@ Future<void> main() async { ...@@ -57,6 +57,8 @@ Future<void> main() async {
); );
}); });
checkDirectoryExists(path.join(projectDir.path, '.ios', 'Flutter', 'engine', 'Flutter.xcframework'));
final Directory ephemeralIOSHostApp = Directory(path.join( final Directory ephemeralIOSHostApp = Directory(path.join(
projectDir.path, projectDir.path,
'build', 'build',
...@@ -90,6 +92,8 @@ Future<void> main() async { ...@@ -90,6 +92,8 @@ Future<void> main() async {
); );
}); });
checkDirectoryExists(path.join(projectDir.path, '.ios', 'Flutter', 'engine', 'Flutter.xcframework'));
if (!exists(ephemeralIOSHostApp)) { if (!exists(ephemeralIOSHostApp)) {
return TaskResult.failure('Failed to build ephemeral host .app'); return TaskResult.failure('Failed to build ephemeral host .app');
} }
...@@ -126,6 +130,7 @@ Future<void> main() async { ...@@ -126,6 +130,7 @@ Future<void> main() async {
if (!exists(ephemeralSimulatorHostApp)) { if (!exists(ephemeralSimulatorHostApp)) {
return TaskResult.failure('Failed to build ephemeral host .app'); return TaskResult.failure('Failed to build ephemeral host .app');
} }
checkFileExists(path.join(ephemeralSimulatorHostApp.path, 'Frameworks', 'Flutter.framework', 'Flutter'));
if (!exists(File(path.join( if (!exists(File(path.join(
ephemeralSimulatorHostApp.path, ephemeralSimulatorHostApp.path,
...@@ -170,6 +175,7 @@ Future<void> main() async { ...@@ -170,6 +175,7 @@ Future<void> main() async {
options: <String>['ios', '--no-codesign', '-v'], options: <String>['ios', '--no-codesign', '-v'],
); );
}); });
checkDirectoryExists(path.join(projectDir.path, '.ios', 'Flutter', 'engine', 'Flutter.xcframework'));
final bool ephemeralHostAppWithCocoaPodsBuilt = exists(ephemeralIOSHostApp); final bool ephemeralHostAppWithCocoaPodsBuilt = exists(ephemeralIOSHostApp);
...@@ -189,6 +195,7 @@ Future<void> main() async { ...@@ -189,6 +195,7 @@ Future<void> main() async {
} }
checkFileExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'device_info.framework', 'device_info')); checkFileExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'device_info.framework', 'device_info'));
checkFileExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'Flutter.framework', 'Flutter'));
// Static, no embedded framework. // Static, no embedded framework.
checkDirectoryNotExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'google_sign_in.framework')); checkDirectoryNotExists(path.join(ephemeralIOSHostApp.path, 'Frameworks', 'google_sign_in.framework'));
......
...@@ -144,8 +144,7 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr ...@@ -144,8 +144,7 @@ is set to release or run \"flutter build ios --release\", then re-run Archive fr
# TODO(jmagman): use assemble copied engine in add-to-app. # TODO(jmagman): use assemble copied engine in add-to-app.
if [[ -e "${project_path}/.ios" ]]; then if [[ -e "${project_path}/.ios" ]]; then
RunCommand rm -rf -- "${derived_dir}/engine/Flutter.framework" RunCommand rsync -av --delete --filter "- .DS_Store" "${flutter_framework}" "${derived_dir}/engine"
RunCommand cp -r -- "${flutter_framework}" "${derived_dir}/engine"
fi fi
RunCommand pushd "${project_path}" > /dev/null RunCommand pushd "${project_path}" > /dev/null
......
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