From 3c9288c6d3db7114a341cbb6ed10a45bdf7aea3c Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Mon, 7 Nov 2022 02:32:42 -0800 Subject: [PATCH] Increase minimum supported macOS version from 10.13 to 10.14 (#114713) Increases the minimum macOS deployment target from macOS 10.13 (High Sierra) to 10.14 (Mojave) in the macOS app templates. Includes: * Update migration for macOS 10.11 apps to upgrade to 10.14 * Adds migration for macOS 10.13 apps to upgrade to 10.14 * Apply migration to all examples, and integration tests This does not increase version in the plugin templates since those will need to wait until the 10.14 framework rolls to stable channel, so new plugins can build with apps created with `flutter create` on stable channel. Issue: https://github.com/flutter/flutter/issues/114445 See RFC: http://flutter.dev/go/flutter-drop-macOS-10.13-2022-q4 See previous patch: https://github.com/flutter/flutter/pull/107689 --- dev/benchmarks/complex_layout/macos/Podfile | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- dev/benchmarks/macrobenchmarks/macos/Podfile | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../flutter_gallery/macos/Podfile | 2 +- .../flutter_gallery/macos/Podfile.lock | 4 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- dev/integration_tests/ui/macos/Podfile | 2 +- .../ui/macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- examples/api/macos/Podfile | 2 +- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- .../macos/Runner.xcodeproj/project.pbxproj | 6 +-- packages/flutter_tools/bin/podhelper.rb | 6 +-- .../src/commands/build_macos_framework.dart | 2 +- .../macos_deployment_target_migration.dart | 23 ++++++---- .../Runner.xcodeproj/project.pbxproj.tmpl | 6 +-- .../templates/cocoapods/Podfile-macos | 2 +- .../macos/macos_project_migration_test.dart | 42 ++++++++++++++++--- 24 files changed, 103 insertions(+), 64 deletions(-) diff --git a/dev/benchmarks/complex_layout/macos/Podfile b/dev/benchmarks/complex_layout/macos/Podfile index fe733905db..049abe2954 100644 --- a/dev/benchmarks/complex_layout/macos/Podfile +++ b/dev/benchmarks/complex_layout/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.13' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/dev/benchmarks/complex_layout/macos/Runner.xcodeproj/project.pbxproj b/dev/benchmarks/complex_layout/macos/Runner.xcodeproj/project.pbxproj index 06b2ea0063..bf26f9fc5e 100644 --- a/dev/benchmarks/complex_layout/macos/Runner.xcodeproj/project.pbxproj +++ b/dev/benchmarks/complex_layout/macos/Runner.xcodeproj/project.pbxproj @@ -387,7 +387,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -466,7 +466,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -513,7 +513,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/dev/benchmarks/macrobenchmarks/macos/Podfile b/dev/benchmarks/macrobenchmarks/macos/Podfile index fe733905db..049abe2954 100644 --- a/dev/benchmarks/macrobenchmarks/macos/Podfile +++ b/dev/benchmarks/macrobenchmarks/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.13' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj b/dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj index 8c53907c48..93283e3986 100644 --- a/dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj +++ b/dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj @@ -400,7 +400,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -479,7 +479,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -526,7 +526,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/dev/integration_tests/channels/macos/Runner.xcodeproj/project.pbxproj b/dev/integration_tests/channels/macos/Runner.xcodeproj/project.pbxproj index ff33b09af2..92924f93b6 100644 --- a/dev/integration_tests/channels/macos/Runner.xcodeproj/project.pbxproj +++ b/dev/integration_tests/channels/macos/Runner.xcodeproj/project.pbxproj @@ -345,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -424,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -471,7 +471,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/dev/integration_tests/flutter_gallery/macos/Podfile b/dev/integration_tests/flutter_gallery/macos/Podfile index 85ce400a93..47c1b18fed 100644 --- a/dev/integration_tests/flutter_gallery/macos/Podfile +++ b/dev/integration_tests/flutter_gallery/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.13' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/dev/integration_tests/flutter_gallery/macos/Podfile.lock b/dev/integration_tests/flutter_gallery/macos/Podfile.lock index 318a6dfff2..4aa9d3e025 100644 --- a/dev/integration_tests/flutter_gallery/macos/Podfile.lock +++ b/dev/integration_tests/flutter_gallery/macos/Podfile.lock @@ -26,10 +26,10 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: connectivity_macos: 5dae6ee11d320fac7c05f0d08bd08fc32b5514d9 - FlutterMacOS: ff8bbbdbe83c20fe0f90a7cc96f00cf753baf5cc + FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24 Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 url_launcher_macos: 597e05b8e514239626bcf4a850fcf9ef5c856ec3 -PODFILE CHECKSUM: 8719e666d6ae56e47eb36dbc2c8341bbe936a0e6 +PODFILE CHECKSUM: 2e6060c123c393d6beb3ee5b7beaf789de4d2e47 COCOAPODS: 1.11.3 diff --git a/dev/integration_tests/flutter_gallery/macos/Runner.xcodeproj/project.pbxproj b/dev/integration_tests/flutter_gallery/macos/Runner.xcodeproj/project.pbxproj index c3c064de83..6de846b34e 100644 --- a/dev/integration_tests/flutter_gallery/macos/Runner.xcodeproj/project.pbxproj +++ b/dev/integration_tests/flutter_gallery/macos/Runner.xcodeproj/project.pbxproj @@ -507,7 +507,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -586,7 +586,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -633,7 +633,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/dev/integration_tests/ui/macos/Podfile b/dev/integration_tests/ui/macos/Podfile index fe733905db..049abe2954 100644 --- a/dev/integration_tests/ui/macos/Podfile +++ b/dev/integration_tests/ui/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.13' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/dev/integration_tests/ui/macos/Runner.xcodeproj/project.pbxproj b/dev/integration_tests/ui/macos/Runner.xcodeproj/project.pbxproj index e2d0428025..22826d7990 100644 --- a/dev/integration_tests/ui/macos/Runner.xcodeproj/project.pbxproj +++ b/dev/integration_tests/ui/macos/Runner.xcodeproj/project.pbxproj @@ -387,7 +387,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -466,7 +466,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -513,7 +513,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/dev/manual_tests/macos/Runner.xcodeproj/project.pbxproj b/dev/manual_tests/macos/Runner.xcodeproj/project.pbxproj index 527fea8c2d..1c26701091 100644 --- a/dev/manual_tests/macos/Runner.xcodeproj/project.pbxproj +++ b/dev/manual_tests/macos/Runner.xcodeproj/project.pbxproj @@ -345,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -424,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -471,7 +471,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/examples/api/macos/Podfile b/examples/api/macos/Podfile index fe733905db..049abe2954 100644 --- a/examples/api/macos/Podfile +++ b/examples/api/macos/Podfile @@ -1,4 +1,4 @@ -platform :osx, '10.13' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/examples/api/macos/Runner.xcodeproj/project.pbxproj b/examples/api/macos/Runner.xcodeproj/project.pbxproj index e27f03c4db..67990fc420 100644 --- a/examples/api/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/api/macos/Runner.xcodeproj/project.pbxproj @@ -387,7 +387,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -466,7 +466,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -513,7 +513,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/examples/flutter_view/macos/Runner.xcodeproj/project.pbxproj b/examples/flutter_view/macos/Runner.xcodeproj/project.pbxproj index c3213047e1..ec50281113 100644 --- a/examples/flutter_view/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/flutter_view/macos/Runner.xcodeproj/project.pbxproj @@ -357,7 +357,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -436,7 +436,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -483,7 +483,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/examples/hello_world/macos/Runner.xcodeproj/project.pbxproj b/examples/hello_world/macos/Runner.xcodeproj/project.pbxproj index 94b164d4c1..fbf49f5a4a 100644 --- a/examples/hello_world/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/hello_world/macos/Runner.xcodeproj/project.pbxproj @@ -345,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -424,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -471,7 +471,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/examples/image_list/macos/Runner.xcodeproj/project.pbxproj b/examples/image_list/macos/Runner.xcodeproj/project.pbxproj index 3546f732ac..64efceb1f1 100644 --- a/examples/image_list/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/image_list/macos/Runner.xcodeproj/project.pbxproj @@ -345,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -424,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -471,7 +471,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/examples/layers/macos/Runner.xcodeproj/project.pbxproj b/examples/layers/macos/Runner.xcodeproj/project.pbxproj index e5f18fc1ec..427d97a6b7 100644 --- a/examples/layers/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/layers/macos/Runner.xcodeproj/project.pbxproj @@ -345,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -423,7 +423,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -470,7 +470,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj b/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj index e590827da5..a150e36a21 100644 --- a/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj +++ b/examples/platform_view/macos/Runner.xcodeproj/project.pbxproj @@ -353,7 +353,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -432,7 +432,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -479,7 +479,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/flutter_tools/bin/podhelper.rb b/packages/flutter_tools/bin/podhelper.rb index 35f7cfd69b..c81ac37a1b 100644 --- a/packages/flutter_tools/bin/podhelper.rb +++ b/packages/flutter_tools/bin/podhelper.rb @@ -105,11 +105,11 @@ def flutter_additional_macos_build_settings(target) # [target.deployment_target] is a [String] formatted as "10.8". deployment_target_major, deployment_target_minor = target.deployment_target.match(/(\d+).?(\d*)/).captures - # Suppress warning when pod supports a version lower than the minimum supported by the latest stable version of Xcode (currently 10.13). + # Suppress warning when pod supports a version lower than the minimum supported by the latest stable version of Xcode (currently 10.14). # This warning is harmless but confusing--it's not a bad thing for dependencies to support a lower version. inherit_deployment_target = !target.deployment_target.blank? && (deployment_target_major.to_i < 10) || - (deployment_target_major.to_i == 10 && deployment_target_minor.to_i < 13) + (deployment_target_major.to_i == 10 && deployment_target_minor.to_i < 14) # This podhelper script is at $FLUTTER_ROOT/packages/flutter_tools/bin. # Add search paths from $FLUTTER_ROOT/bin/cache/artifacts/engine. @@ -230,7 +230,7 @@ def flutter_install_macos_engine_pod(mac_application_path = nil) s.license = { :type => 'BSD' } s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s } - s.osx.deployment_target = '10.13' + s.osx.deployment_target = '10.14' # Framework linking is handled by Flutter tooling, not CocoaPods. # Add a placeholder to satisfy `s.dependency 'FlutterMacOS'` plugin podspecs. s.vendored_frameworks = 'path/to/nothing' diff --git a/packages/flutter_tools/lib/src/commands/build_macos_framework.dart b/packages/flutter_tools/lib/src/commands/build_macos_framework.dart index e6e65f4b31..036af97259 100644 --- a/packages/flutter_tools/lib/src/commands/build_macos_framework.dart +++ b/packages/flutter_tools/lib/src/commands/build_macos_framework.dart @@ -162,7 +162,7 @@ LICENSE s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' } s.source = { :http => '${cache.storageBaseUrl}/flutter_infra_release/flutter/${cache.engineRevision}/$artifactsMode/artifacts.zip' } s.documentation_url = 'https://flutter.dev/docs' - s.osx.deployment_target = '10.13' + s.osx.deployment_target = '10.14' s.vendored_frameworks = 'FlutterMacOS.framework' s.prepare_command = 'unzip FlutterMacOS.framework -d FlutterMacOS.framework' end diff --git a/packages/flutter_tools/lib/src/macos/migrations/macos_deployment_target_migration.dart b/packages/flutter_tools/lib/src/macos/migrations/macos_deployment_target_migration.dart index 63f1354fe9..48b6aee6df 100644 --- a/packages/flutter_tools/lib/src/macos/migrations/macos_deployment_target_migration.dart +++ b/packages/flutter_tools/lib/src/macos/migrations/macos_deployment_target_migration.dart @@ -35,22 +35,29 @@ class MacOSDeploymentTargetMigration extends ProjectMigrator { @override String? migrateLine(String line) { // Xcode project file changes. - const String deploymentTargetOriginal = 'MACOSX_DEPLOYMENT_TARGET = 10.11;'; + const String deploymentTargetOriginal1011 = 'MACOSX_DEPLOYMENT_TARGET = 10.11;'; + const String deploymentTargetOriginal1013 = 'MACOSX_DEPLOYMENT_TARGET = 10.13;'; // Podfile changes. - const String podfilePlatformVersionOriginal = "platform :osx, '10.11'"; + const String podfilePlatformVersionOriginal1011 = "platform :osx, '10.11'"; + const String podfilePlatformVersionOriginal1013 = "platform :osx, '10.13'"; - if (line.contains(deploymentTargetOriginal) || line.contains(podfilePlatformVersionOriginal)) { + if (line.contains(deploymentTargetOriginal1011) + || line.contains(deploymentTargetOriginal1013) + || line.contains(podfilePlatformVersionOriginal1011) + || line.contains(podfilePlatformVersionOriginal1013)) { if (!migrationRequired) { // Only print for the first discovered change found. - logger.printStatus('Updating minimum macOS deployment target to 10.13.'); + logger.printStatus('Updating minimum macOS deployment target to 10.14.'); } - const String deploymentTargetReplacement = 'MACOSX_DEPLOYMENT_TARGET = 10.13;'; - const String podfilePlatformVersionReplacement = "platform :osx, '10.13'"; + const String deploymentTargetReplacement = 'MACOSX_DEPLOYMENT_TARGET = 10.14;'; + const String podfilePlatformVersionReplacement = "platform :osx, '10.14'"; return line - .replaceAll(deploymentTargetOriginal, deploymentTargetReplacement) - .replaceAll(podfilePlatformVersionOriginal, podfilePlatformVersionReplacement); + .replaceAll(deploymentTargetOriginal1011, deploymentTargetReplacement) + .replaceAll(deploymentTargetOriginal1013, deploymentTargetReplacement) + .replaceAll(podfilePlatformVersionOriginal1011, podfilePlatformVersionReplacement) + .replaceAll(podfilePlatformVersionOriginal1013, podfilePlatformVersionReplacement); } return line; diff --git a/packages/flutter_tools/templates/app_shared/macos.tmpl/Runner.xcodeproj/project.pbxproj.tmpl b/packages/flutter_tools/templates/app_shared/macos.tmpl/Runner.xcodeproj/project.pbxproj.tmpl index 14b32aa86b..51f0a52e34 100644 --- a/packages/flutter_tools/templates/app_shared/macos.tmpl/Runner.xcodeproj/project.pbxproj.tmpl +++ b/packages/flutter_tools/templates/app_shared/macos.tmpl/Runner.xcodeproj/project.pbxproj.tmpl @@ -345,7 +345,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; @@ -424,7 +424,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -471,7 +471,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = macosx; SWIFT_COMPILATION_MODE = wholemodule; diff --git a/packages/flutter_tools/templates/cocoapods/Podfile-macos b/packages/flutter_tools/templates/cocoapods/Podfile-macos index fe733905db..049abe2954 100644 --- a/packages/flutter_tools/templates/cocoapods/Podfile-macos +++ b/packages/flutter_tools/templates/cocoapods/Podfile-macos @@ -1,4 +1,4 @@ -platform :osx, '10.13' +platform :osx, '10.14' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart b/packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart index 47d5a8364c..2b8491d751 100644 --- a/packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart +++ b/packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart @@ -188,12 +188,12 @@ keep this 2 }); testWithoutContext('skipped if nothing to upgrade', () { - const String xcodeProjectInfoFileContents = 'MACOSX_DEPLOYMENT_TARGET = 10.13;'; + const String xcodeProjectInfoFileContents = 'MACOSX_DEPLOYMENT_TARGET = 10.14;'; xcodeProjectInfoFile.writeAsStringSync(xcodeProjectInfoFileContents); final DateTime projectLastModified = xcodeProjectInfoFile.lastModifiedSync(); - const String podfileFileContents = "# platform :osx, '10.13'"; + const String podfileFileContents = "# platform :osx, '10.14'"; podfile.writeAsStringSync(podfileFileContents); final DateTime podfileLastModified = podfile.lastModifiedSync(); @@ -211,7 +211,7 @@ keep this 2 expect(testLogger.statusText, isEmpty); }); - testWithoutContext('Xcode project is migrated to 10.13', () { + testWithoutContext('Xcode project is migrated from 10.11 to 10.14', () { xcodeProjectInfoFile.writeAsStringSync(''' GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.11; @@ -231,16 +231,48 @@ platform :osx, '10.11' expect(xcodeProjectInfoFile.readAsStringSync(), ''' GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.13; + MACOSX_DEPLOYMENT_TARGET = 10.14; MTL_ENABLE_DEBUG_INFO = YES; '''); expect(podfile.readAsStringSync(), ''' +# platform :osx, '10.14' +platform :osx, '10.14' +'''); + // Only print once even though 2 lines were changed. + expect('Updating minimum macOS deployment target to 10.14'.allMatches(testLogger.statusText).length, 1); + }); + + testWithoutContext('Xcode project is migrated from 10.13 to 10.14', () { + xcodeProjectInfoFile.writeAsStringSync(''' + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.13; + MTL_ENABLE_DEBUG_INFO = YES; +'''); + + podfile.writeAsStringSync(''' # platform :osx, '10.13' platform :osx, '10.13' +'''); + + final MacOSDeploymentTargetMigration macOSProjectMigration = MacOSDeploymentTargetMigration( + project, + testLogger, + ); + macOSProjectMigration.migrate(); + + expect(xcodeProjectInfoFile.readAsStringSync(), ''' + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.14; + MTL_ENABLE_DEBUG_INFO = YES; +'''); + + expect(podfile.readAsStringSync(), ''' +# platform :osx, '10.14' +platform :osx, '10.14' '''); // Only print once even though 2 lines were changed. - expect('Updating minimum macOS deployment target to 10.13'.allMatches(testLogger.statusText).length, 1); + expect('Updating minimum macOS deployment target to 10.14'.allMatches(testLogger.statusText).length, 1); }); }); }