Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c4975d9b
Unverified
Commit
c4975d9b
authored
Jul 15, 2022
by
Jenn Magder
Committed by
GitHub
Jul 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase app minimum supported macOS version from 10.11 to 10.13 (#107689)
parent
89f8e5f6
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
315 additions
and
159 deletions
+315
-159
Podfile
dev/benchmarks/macrobenchmarks/macos/Podfile
+1
-1
project.pbxproj
...ks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj
+3
-3
Podfile
dev/integration_tests/flutter_gallery/macos/Podfile
+1
-1
Podfile.lock
dev/integration_tests/flutter_gallery/macos/Podfile.lock
+4
-4
project.pbxproj
...ts/flutter_gallery/macos/Runner.xcodeproj/project.pbxproj
+3
-3
Podfile
dev/integration_tests/ui/macos/Podfile
+1
-1
project.pbxproj
...tegration_tests/ui/macos/Runner.xcodeproj/project.pbxproj
+3
-3
project.pbxproj
dev/manual_tests/macos/Runner.xcodeproj/project.pbxproj
+3
-3
project.pbxproj
examples/hello_world/macos/Runner.xcodeproj/project.pbxproj
+3
-3
project.pbxproj
examples/image_list/macos/Runner.xcodeproj/project.pbxproj
+3
-3
project.pbxproj
examples/layers/macos/Runner.xcodeproj/project.pbxproj
+3
-3
podhelper.rb
packages/flutter_tools/bin/podhelper.rb
+3
-3
build_macos_framework.dart
...flutter_tools/lib/src/commands/build_macos_framework.dart
+1
-1
mac.dart
packages/flutter_tools/lib/src/ios/mac.dart
+2
-2
ios_deployment_target_migration.dart
...b/src/ios/migrations/ios_deployment_target_migration.dart
+3
-3
build_macos.dart
packages/flutter_tools/lib/src/macos/build_macos.dart
+2
-0
macos_deployment_target_migration.dart
...c/macos/migrations/macos_deployment_target_migration.dart
+60
-0
project.pbxproj.tmpl
...p_shared/macos.tmpl/Runner.xcodeproj/project.pbxproj.tmpl
+3
-3
Podfile-macos
packages/flutter_tools/templates/cocoapods/Podfile-macos
+1
-1
ios_project_migration_test.dart
...ls/test/general.shard/ios/ios_project_migration_test.dart
+5
-5
macos_project_migration_test.dart
...est/general.shard/macos/macos_project_migration_test.dart
+207
-113
No files found.
dev/benchmarks/macrobenchmarks/macos/Podfile
View file @
c4975d9b
platform
:osx
,
'10.1
1
'
platform
:osx
,
'10.1
3
'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV
[
'COCOAPODS_DISABLE_STATS'
]
=
'true'
...
...
dev/benchmarks/macrobenchmarks/macos/Runner.xcodeproj/project.pbxproj
View file @
c4975d9b
...
...
@@ -399,7 +399,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
@@ -478,7 +478,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
macosx
;
...
...
@@ -525,7 +525,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
dev/integration_tests/flutter_gallery/macos/Podfile
View file @
c4975d9b
platform
:osx
,
'10.1
1
'
platform
:osx
,
'10.1
3
'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV
[
'COCOAPODS_DISABLE_STATS'
]
=
'true'
...
...
dev/integration_tests/flutter_gallery/macos/Podfile.lock
View file @
c4975d9b
...
...
@@ -26,10 +26,10 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
connectivity_macos: 5dae6ee11d320fac7c05f0d08bd08fc32b5514d9
FlutterMacOS:
57701585bf7de1b3fc2bb61f6378d73bbdea8424
FlutterMacOS:
ff8bbbdbe83c20fe0f90a7cc96f00cf753baf5cc
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
url_launcher_macos:
45af3d61de06997666568a7149c1be98b41c95d4
url_launcher_macos:
597e05b8e514239626bcf4a850fcf9ef5c856ec3
PODFILE CHECKSUM:
b5c36ba411e4471a03727d0463fa17be341876c1
PODFILE CHECKSUM:
8719e666d6ae56e47eb36dbc2c8341bbe936a0e6
COCOAPODS: 1.11.
2
COCOAPODS: 1.11.
3
dev/integration_tests/flutter_gallery/macos/Runner.xcodeproj/project.pbxproj
View file @
c4975d9b
...
...
@@ -506,7 +506,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
@@ -585,7 +585,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
macosx
;
...
...
@@ -632,7 +632,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
dev/integration_tests/ui/macos/Podfile
View file @
c4975d9b
platform
:osx
,
'10.1
1
'
platform
:osx
,
'10.1
3
'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV
[
'COCOAPODS_DISABLE_STATS'
]
=
'true'
...
...
dev/integration_tests/ui/macos/Runner.xcodeproj/project.pbxproj
View file @
c4975d9b
...
...
@@ -386,7 +386,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
@@ -465,7 +465,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
macosx
;
...
...
@@ -512,7 +512,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
dev/manual_tests/macos/Runner.xcodeproj/project.pbxproj
View file @
c4975d9b
...
...
@@ -344,7 +344,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
examples/hello_world/macos/Runner.xcodeproj/project.pbxproj
View file @
c4975d9b
...
...
@@ -344,7 +344,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
examples/image_list/macos/Runner.xcodeproj/project.pbxproj
View file @
c4975d9b
...
...
@@ -344,7 +344,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
examples/layers/macos/Runner.xcodeproj/project.pbxproj
View file @
c4975d9b
...
...
@@ -344,7 +344,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
@@ -422,7 +422,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
YES
;
ONLY_ACTIVE_ARCH
=
YES
;
SDKROOT
=
macosx
;
...
...
@@ -469,7 +469,7 @@
GCC_WARN_UNINITIALIZED_AUTOS
=
YES_AGGRESSIVE
;
GCC_WARN_UNUSED_FUNCTION
=
YES
;
GCC_WARN_UNUSED_VARIABLE
=
YES
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
1
;
MACOSX_DEPLOYMENT_TARGET
=
10.1
3
;
MTL_ENABLE_DEBUG_INFO
=
NO
;
SDKROOT
=
macosx
;
SWIFT_COMPILATION_MODE
=
wholemodule
;
...
...
packages/flutter_tools/bin/podhelper.rb
View file @
c4975d9b
...
...
@@ -95,11 +95,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.
9
).
# Suppress warning when pod supports a version lower than the minimum supported by the latest stable version of Xcode (currently 10.
13
).
# 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
<
9
)
(
deployment_target_major
.
to_i
==
10
&&
deployment_target_minor
.
to_i
<
13
)
# This podhelper script is at $FLUTTER_ROOT/packages/flutter_tools/bin.
# Add search paths from $FLUTTER_ROOT/bin/cache/artifacts/engine.
...
...
@@ -220,7 +220,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.1
1
'
s.osx.deployment_target = '10.1
3
'
# 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'
...
...
packages/flutter_tools/lib/src/commands/build_macos_framework.dart
View file @
c4975d9b
...
...
@@ -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.1
1
'
s
.
osx
.
deployment_target
=
'10.1
3
'
s
.
vendored_frameworks
=
'FlutterMacOS.framework'
s
.
prepare_command
=
'unzip FlutterMacOS.framework -d FlutterMacOS.framework'
end
...
...
packages/flutter_tools/lib/src/ios/mac.dart
View file @
c4975d9b
...
...
@@ -25,8 +25,8 @@ import '../reporting/reporting.dart';
import
'application_package.dart'
;
import
'code_signing.dart'
;
import
'iproxy.dart'
;
import
'migrations/deployment_target_migration.dart'
;
import
'migrations/host_app_info_plist_migration.dart'
;
import
'migrations/ios_deployment_target_migration.dart'
;
import
'migrations/project_base_configuration_migration.dart'
;
import
'migrations/project_build_location_migration.dart'
;
import
'migrations/project_object_version_migration.dart'
;
...
...
@@ -123,7 +123,7 @@ Future<XcodeBuildResult> buildXcodeProject({
XcodeBuildSystemMigration
(
app
.
project
,
globals
.
logger
),
ProjectBaseConfigurationMigration
(
app
.
project
,
globals
.
logger
),
ProjectBuildLocationMigration
(
app
.
project
,
globals
.
logger
),
DeploymentTargetMigration
(
app
.
project
,
globals
.
logger
),
IOS
DeploymentTargetMigration
(
app
.
project
,
globals
.
logger
),
ProjectObjectVersionMigration
(
app
.
project
,
globals
.
logger
),
HostAppInfoPlistMigration
(
app
.
project
,
globals
.
logger
),
];
...
...
packages/flutter_tools/lib/src/ios/migrations/deployment_target_migration.dart
→
packages/flutter_tools/lib/src/ios/migrations/
ios_
deployment_target_migration.dart
View file @
c4975d9b
...
...
@@ -7,8 +7,8 @@ import '../../base/project_migrator.dart';
import
'../../xcode_project.dart'
;
/// Update the minimum iOS deployment version to the minimum allowed by Xcode without causing a warning.
class
DeploymentTargetMigration
extends
ProjectMigrator
{
DeploymentTargetMigration
(
class
IOS
DeploymentTargetMigration
extends
ProjectMigrator
{
IOS
DeploymentTargetMigration
(
IosProject
project
,
super
.
logger
,
)
:
_xcodeProjectInfoFile
=
project
.
xcodeProjectInfoFile
,
...
...
@@ -36,7 +36,7 @@ class DeploymentTargetMigration extends ProjectMigrator {
if
(
_podfile
.
existsSync
())
{
processFileLines
(
_podfile
);
}
else
{
logger
.
printTrace
(
'Podfile not found, skipping global platform version migration.'
);
logger
.
printTrace
(
'Podfile not found, skipping global platform
iOS
version migration.'
);
}
return
true
;
...
...
packages/flutter_tools/lib/src/macos/build_macos.dart
View file @
c4975d9b
...
...
@@ -14,6 +14,7 @@ import '../ios/xcode_build_settings.dart';
import
'../ios/xcodeproj.dart'
;
import
'../project.dart'
;
import
'cocoapod_utils.dart'
;
import
'migrations/macos_deployment_target_migration.dart'
;
import
'migrations/remove_macos_framework_link_and_embedding_migration.dart'
;
/// When run in -quiet mode, Xcode should only print from the underlying tasks to stdout.
...
...
@@ -45,6 +46,7 @@ Future<void> buildMacOS({
globals
.
logger
,
globals
.
flutterUsage
,
),
MacOSDeploymentTargetMigration
(
flutterProject
.
macos
,
globals
.
logger
),
];
final
ProjectMigration
migration
=
ProjectMigration
(
migrators
);
...
...
packages/flutter_tools/lib/src/macos/migrations/macos_deployment_target_migration.dart
0 → 100644
View file @
c4975d9b
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'../../base/file_system.dart'
;
import
'../../base/project_migrator.dart'
;
import
'../../xcode_project.dart'
;
/// Update the minimum macOS deployment version to the minimum allowed by Xcode without causing a warning.
class
MacOSDeploymentTargetMigration
extends
ProjectMigrator
{
MacOSDeploymentTargetMigration
(
MacOSProject
project
,
super
.
logger
,
)
:
_xcodeProjectInfoFile
=
project
.
xcodeProjectInfoFile
,
_podfile
=
project
.
podfile
;
final
File
_xcodeProjectInfoFile
;
final
File
_podfile
;
@override
bool
migrate
()
{
if
(
_xcodeProjectInfoFile
.
existsSync
())
{
processFileLines
(
_xcodeProjectInfoFile
);
}
else
{
logger
.
printTrace
(
'Xcode project not found, skipping macOS deployment target version migration.'
);
}
if
(
_podfile
.
existsSync
())
{
processFileLines
(
_podfile
);
}
else
{
logger
.
printTrace
(
'Podfile not found, skipping global platform macOS version migration.'
);
}
return
true
;
}
@override
String
?
migrateLine
(
String
line
)
{
// Xcode project file changes.
const
String
deploymentTargetOriginal
=
'MACOSX_DEPLOYMENT_TARGET = 10.11;'
;
// Podfile changes.
const
String
podfilePlatformVersionOriginal
=
"platform :osx, '10.11'"
;
if
(
line
.
contains
(
deploymentTargetOriginal
)
||
line
.
contains
(
podfilePlatformVersionOriginal
))
{
if
(!
migrationRequired
)
{
// Only print for the first discovered change found.
logger
.
printStatus
(
'Updating minimum macOS deployment target to 10.13.'
);
}
const
String
deploymentTargetReplacement
=
'MACOSX_DEPLOYMENT_TARGET = 10.13;'
;
const
String
podfilePlatformVersionReplacement
=
"platform :osx, '10.13'"
;
return
line
.
replaceAll
(
deploymentTargetOriginal
,
deploymentTargetReplacement
)
.
replaceAll
(
podfilePlatformVersionOriginal
,
podfilePlatformVersionReplacement
);
}
return
line
;
}
}
packages/flutter_tools/templates/app_shared/macos.tmpl/Runner.xcodeproj/project.pbxproj.tmpl
View file @
c4975d9b
...
...
@@ -344,7 +344,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.1
1
;
MACOSX_DEPLOYMENT_TARGET = 10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET = 10.1
3
;
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.1
1
;
MACOSX_DEPLOYMENT_TARGET = 10.1
3
;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
SWIFT_COMPILATION_MODE = wholemodule;
...
...
packages/flutter_tools/templates/cocoapods/Podfile-macos
View file @
c4975d9b
platform :osx, '10.1
1
'
platform :osx, '10.1
3
'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
...
...
packages/flutter_tools/test/general.shard/ios/ios_project_migration_test.dart
View file @
c4975d9b
...
...
@@ -6,8 +6,8 @@ import 'package:file/file.dart';
import
'package:file/memory.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/base/project_migrator.dart'
;
import
'package:flutter_tools/src/ios/migrations/deployment_target_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/host_app_info_plist_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/ios_deployment_target_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_base_configuration_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_build_location_migration.dart'
;
import
'package:flutter_tools/src/ios/migrations/project_object_version_migration.dart'
;
...
...
@@ -514,7 +514,7 @@ keep this 3
});
testWithoutContext
(
'skipped if files are missing'
,
()
{
final
DeploymentTargetMigration
iosProjectMigration
=
DeploymentTargetMigration
(
final
IOSDeploymentTargetMigration
iosProjectMigration
=
IOS
DeploymentTargetMigration
(
project
,
testLogger
,
);
...
...
@@ -525,7 +525,7 @@ keep this 3
expect
(
testLogger
.
traceText
,
contains
(
'Xcode project not found, skipping iOS deployment target version migration'
));
expect
(
testLogger
.
traceText
,
contains
(
'AppFrameworkInfo.plist not found, skipping minimum OS version migration'
));
expect
(
testLogger
.
traceText
,
contains
(
'Podfile not found, skipping global platform version migration'
));
expect
(
testLogger
.
traceText
,
contains
(
'Podfile not found, skipping global platform
iOS
version migration'
));
expect
(
testLogger
.
statusText
,
isEmpty
);
});
...
...
@@ -545,7 +545,7 @@ keep this 3
podfile
.
writeAsStringSync
(
podfileFileContents
);
final
DateTime
podfileLastModified
=
podfile
.
lastModifiedSync
();
final
DeploymentTargetMigration
iosProjectMigration
=
DeploymentTargetMigration
(
final
IOSDeploymentTargetMigration
iosProjectMigration
=
IOS
DeploymentTargetMigration
(
project
,
testLogger
,
);
...
...
@@ -591,7 +591,7 @@ keep this 3
platform :ios, '
9.0
'
'''
);
final
DeploymentTargetMigration
iosProjectMigration
=
DeploymentTargetMigration
(
final
IOSDeploymentTargetMigration
iosProjectMigration
=
IOS
DeploymentTargetMigration
(
project
,
testLogger
,
);
...
...
packages/flutter_tools/test/general.shard/macos/macos_project_migration_test.dart
View file @
c4975d9b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment