diff --git a/.ci/flutter_master.version b/.ci/flutter_master.version index 5a756fa2e7c0..b6bb41360bc1 100644 --- a/.ci/flutter_master.version +++ b/.ci/flutter_master.version @@ -1 +1 @@ -46fb7210422d8c0733aa89b34cc0aa48b632bc8e +d3dd7744e81f0ed11d535d0bbfb633affb79345e diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/AlternateLanguageTestPlugin.h b/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/AlternateLanguageTestPlugin.h index 99490f3d3033..4cc25a15e70d 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/AlternateLanguageTestPlugin.h +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/AlternateLanguageTestPlugin.h @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include + #if TARGET_OS_OSX #import #else diff --git a/script/tool/lib/src/create_all_packages_app_command.dart b/script/tool/lib/src/create_all_packages_app_command.dart index 6223f708c84e..0703972ec1b1 100644 --- a/script/tool/lib/src/create_all_packages_app_command.dart +++ b/script/tool/lib/src/create_all_packages_app_command.dart @@ -424,13 +424,17 @@ dev_dependencies:${_pubspecMapString(pubspec.devDependencies)} final File podfile = app .platformDirectory(FlutterPlatform.macos) .childFile('Podfile'); - _adjustFile( - podfile, - replacements: >{ - // macOS 10.15 is required by in_app_purchase. - 'platform :osx': ["platform :osx, '10.15'"], - }, - ); + if (podfile.existsSync()) { + _adjustFile( + podfile, + replacements: >{ + // macOS 10.15 is required by in_app_purchase. + 'platform :osx': ["platform :osx, '10.15'"], + }, + ); + } else { + print('Unable to find ${podfile.path} for updating. Skipping.'); + } } Future _updateMacOSPbxproj() async { diff --git a/script/tool/test/create_all_packages_app_command_test.dart b/script/tool/test/create_all_packages_app_command_test.dart index a20aac6444f1..0d6cca4100c7 100644 --- a/script/tool/test/create_all_packages_app_command_test.dart +++ b/script/tool/test/create_all_packages_app_command_test.dart @@ -659,5 +659,31 @@ platform :osx, '10.11' // Podfile is only generated (and thus only edited) on macOS. skip: !io.Platform.isMacOS, ); + + test( + 'macOS skips change to Podfile if file does not exist', + () async { + writeFakeFlutterCreateOutput(testRoot); + createFakePlugin('plugina', packagesDir); + + final File podfileFile = RepositoryPackage( + command.packagesDir.parent.childDirectory(allPackagesProjectName), + ).platformDirectory(FlutterPlatform.macos).childFile('Podfile'); + podfileFile.deleteSync(); + expect(podfileFile.existsSync(), isFalse); + + final List prints = await runCapturingPrint(runner, [ + 'create-all-packages-app', + ]); + expect( + prints, + contains( + 'Unable to find ${podfileFile.path} for updating. Skipping.', + ), + ); + }, + // Podfile is only generated (and thus only edited) on macOS. + skip: !io.Platform.isMacOS, + ); }); }