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
8f360c97
Unverified
Commit
8f360c97
authored
Mar 02, 2022
by
Jenn Magder
Committed by
GitHub
Mar 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update minimum required version to Xcode 13 (#97746)
parent
fdcd1446
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
56 deletions
+21
-56
user_messages.dart
packages/flutter_tools/lib/src/base/user_messages.dart
+1
-1
xcode.dart
packages/flutter_tools/lib/src/macos/xcode.dart
+2
-2
xcode_test.dart
...es/flutter_tools/test/general.shard/macos/xcode_test.dart
+14
-49
xcode_validator_test.dart
..._tools/test/general.shard/macos/xcode_validator_test.dart
+2
-2
context.dart
packages/flutter_tools/test/src/context.dart
+2
-2
No files found.
packages/flutter_tools/lib/src/base/user_messages.dart
View file @
8f360c97
...
...
@@ -147,7 +147,7 @@ class UserMessages {
String
xcodeLocation
(
String
location
)
=>
'Xcode at
$location
'
;
String
xcodeOutdated
(
String
requiredVersion
)
=>
'Flutter requires
a minimum Xcode version of
$requiredVersion
.
\n
'
'Flutter requires
Xcode
$requiredVersion
or higher
.
\n
'
'Download the latest version or update via the Mac App Store.'
;
String
xcodeRecommended
(
String
recommendedVersion
)
=>
...
...
packages/flutter_tools/lib/src/macos/xcode.dart
View file @
8f360c97
...
...
@@ -18,11 +18,11 @@ import '../base/version.dart';
import
'../build_info.dart'
;
import
'../ios/xcodeproj.dart'
;
Version
get
xcodeRequiredVersion
=>
Version
(
1
2
,
3
,
null
,
text:
'12.3'
);
Version
get
xcodeRequiredVersion
=>
Version
(
1
3
,
null
,
null
);
/// Diverging this number from the minimum required version will provide a doctor
/// warning, not error, that users should upgrade Xcode.
Version
get
xcodeRecommendedVersion
=>
Version
(
13
,
null
,
null
,
text:
'13'
)
;
Version
get
xcodeRecommendedVersion
=>
xcodeRequiredVersion
;
/// SDK name passed to `xcrun --sdk`. Corresponds to undocumented Xcode
/// SUPPORTED_PLATFORMS values.
...
...
packages/flutter_tools/test/general.shard/macos/xcode_test.dart
View file @
8f360c97
...
...
@@ -133,85 +133,50 @@ void main() {
expect
(
fakeProcessManager
.
hasRemainingExpectations
,
isFalse
);
});
testWithoutContext
(
'
xcodeVersionSatisfactory is false
when version is less than minimum'
,
()
{
testWithoutContext
(
'
version checks fail
when version is less than minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
9
,
0
,
0
);
xcodeProjectInterpreter
.
version
=
Version
(
9
,
null
,
null
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isFalse
);
});
testWithoutContext
(
'xcodeVersionSatisfactory is false when xcodebuild tools are not installed'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
false
;
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isFalse
);
});
testWithoutContext
(
'xcodeVersionSatisfactory is true when version meets minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
12
,
3
,
null
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
});
testWithoutContext
(
'xcodeVersionSatisfactory is true when major version exceeds minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
13
,
0
,
0
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
});
testWithoutContext
(
'xcodeVersionSatisfactory is true when minor version exceeds minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
12
,
5
,
0
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
});
testWithoutContext
(
'xcodeVersionSatisfactory is true when patch version exceeds minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
12
,
3
,
1
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
});
testWithoutContext
(
'isRecommendedVersionSatisfactory is false when version is less than minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
12
,
null
,
null
);
expect
(
xcode
.
isRecommendedVersionSatisfactory
,
isFalse
);
});
testWithoutContext
(
'
isRecommendedVersionSatisfactory is false
when xcodebuild tools are not installed'
,
()
{
testWithoutContext
(
'
version checks fail
when xcodebuild tools are not installed'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
false
;
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isFalse
);
expect
(
xcode
.
isRecommendedVersionSatisfactory
,
isFalse
);
});
testWithoutContext
(
'
isRecommendedVersionSatisfactory is true
when version meets minimum'
,
()
{
testWithoutContext
(
'
version checks pass
when version meets minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
13
,
0
,
0
);
xcodeProjectInterpreter
.
version
=
Version
(
13
,
null
,
null
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
expect
(
xcode
.
isRecommendedVersionSatisfactory
,
isTrue
);
});
testWithoutContext
(
'
isRecommendedVersionSatisfactory is true
when major version exceeds minimum'
,
()
{
testWithoutContext
(
'
version checks pass
when major version exceeds minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
14
,
0
,
0
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
expect
(
xcode
.
isRecommendedVersionSatisfactory
,
isTrue
);
});
testWithoutContext
(
'
isRecommendedVersionSatisfactory is true
when minor version exceeds minimum'
,
()
{
testWithoutContext
(
'
version checks pass
when minor version exceeds minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
13
,
3
,
0
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
expect
(
xcode
.
isRecommendedVersionSatisfactory
,
isTrue
);
});
testWithoutContext
(
'
isRecommendedVersionSatisfactory is true
when patch version exceeds minimum'
,
()
{
testWithoutContext
(
'
version checks pass
when patch version exceeds minimum'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
13
,
0
,
2
);
expect
(
xcode
.
isRequiredVersionSatisfactory
,
isTrue
);
expect
(
xcode
.
isRecommendedVersionSatisfactory
,
isTrue
);
});
...
...
@@ -232,7 +197,7 @@ void main() {
testWithoutContext
(
'isInstalledAndMeetsVersionCheck is true when macOS and installed and version is satisfied'
,
()
{
xcodeProjectInterpreter
.
isInstalled
=
true
;
xcodeProjectInterpreter
.
version
=
Version
(
1
2
,
3
,
null
);
xcodeProjectInterpreter
.
version
=
Version
(
1
3
,
null
,
null
);
expect
(
xcode
.
isInstalledAndMeetsVersionCheck
,
isTrue
);
expect
(
fakeProcessManager
.
hasRemainingExpectations
,
isFalse
);
...
...
packages/flutter_tools/test/general.shard/macos/xcode_validator_test.dart
View file @
8f360c97
...
...
@@ -56,7 +56,7 @@ void main() {
final
ValidationResult
result
=
await
validator
.
validate
();
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
error
);
expect
(
result
.
messages
.
last
.
message
,
contains
(
'Flutter requires
a minimum Xcode version of 12.3
'
));
expect
(
result
.
messages
.
last
.
message
,
contains
(
'Flutter requires
Xcode 13 or higher
'
));
});
testWithoutContext
(
'Emits partial status when Xcode below recommended version'
,
()
async
{
...
...
@@ -70,7 +70,7 @@ void main() {
expect
(
result
.
type
,
ValidationType
.
partial
);
expect
(
result
.
messages
.
last
.
type
,
ValidationMessageType
.
hint
);
expect
(
result
.
messages
.
last
.
message
,
contains
(
'Flutter recommends a minimum Xcode version of 13'
));
}
);
}
,
skip:
true
);
// [intended] Unskip and update when minimum and required check versions diverge.
testWithoutContext
(
'Emits partial status when Xcode EULA not signed'
,
()
async
{
final
ProcessManager
processManager
=
FakeProcessManager
.
list
(<
FakeCommand
>[
...
...
packages/flutter_tools/test/src/context.dart
View file @
8f360c97
...
...
@@ -294,10 +294,10 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter {
bool
get
isInstalled
=>
true
;
@override
String
get
versionText
=>
'Xcode 1
2.
3'
;
String
get
versionText
=>
'Xcode 13'
;
@override
Version
get
version
=>
Version
(
1
2
,
3
,
null
);
Version
get
version
=>
Version
(
1
3
,
null
,
null
);
@override
Future
<
Map
<
String
,
String
>>
getBuildSettings
(
...
...
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