Unverified Commit 4411d8e6 authored by Jenn Magder's avatar Jenn Magder Committed by GitHub

Update minimum version to Xcode 11.0 (#50371)

parent b65f4211
...@@ -19,8 +19,8 @@ import '../ios/devices.dart'; ...@@ -19,8 +19,8 @@ import '../ios/devices.dart';
import '../ios/xcodeproj.dart'; import '../ios/xcodeproj.dart';
import '../reporting/reporting.dart'; import '../reporting/reporting.dart';
const int kXcodeRequiredVersionMajor = 10; const int kXcodeRequiredVersionMajor = 11;
const int kXcodeRequiredVersionMinor = 2; const int kXcodeRequiredVersionMinor = 0;
enum SdkType { enum SdkType {
iPhone, iPhone,
......
...@@ -90,9 +90,9 @@ void main() { ...@@ -90,9 +90,9 @@ void main() {
testWithoutContext('xcodebuild majorVersion returns major version', () { testWithoutContext('xcodebuild majorVersion returns major version', () {
when(processManager.runSync(<String>[xcodebuild, '-version'])) when(processManager.runSync(<String>[xcodebuild, '-version']))
.thenReturn(ProcessResult(1, 0, 'Xcode 10.3.3\nBuild version 8E3004b', '')); .thenReturn(ProcessResult(1, 0, 'Xcode 11.4.1\nBuild version 11N111s', ''));
expect(xcodeProjectInterpreter.majorVersion, 10); expect(xcodeProjectInterpreter.majorVersion, 11);
}); });
testWithoutContext('xcodebuild majorVersion is null when version has unexpected format', () { testWithoutContext('xcodebuild majorVersion is null when version has unexpected format', () {
...@@ -102,7 +102,7 @@ void main() { ...@@ -102,7 +102,7 @@ void main() {
expect(xcodeProjectInterpreter.majorVersion, isNull); expect(xcodeProjectInterpreter.majorVersion, isNull);
}); });
testWithoutContext('xcodebuild inorVersion returns minor version', () { testWithoutContext('xcodebuild minorVersion returns minor version', () {
when(processManager.runSync(<String>[xcodebuild, '-version'])) when(processManager.runSync(<String>[xcodebuild, '-version']))
.thenReturn(ProcessResult(1, 0, 'Xcode 8.3.3\nBuild version 8E3004b', '')); .thenReturn(ProcessResult(1, 0, 'Xcode 8.3.3\nBuild version 8E3004b', ''));
......
...@@ -83,23 +83,23 @@ void main() { ...@@ -83,23 +83,23 @@ void main() {
testWithoutContext('xcodeVersionSatisfactory is true when version meets minimum', () { testWithoutContext('xcodeVersionSatisfactory is true when version meets minimum', () {
when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true); when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true);
when(mockXcodeProjectInterpreter.majorVersion).thenReturn(10); when(mockXcodeProjectInterpreter.majorVersion).thenReturn(11);
when(mockXcodeProjectInterpreter.minorVersion).thenReturn(2); when(mockXcodeProjectInterpreter.minorVersion).thenReturn(0);
expect(xcode.isVersionSatisfactory, isTrue); expect(xcode.isVersionSatisfactory, isTrue);
}); });
testWithoutContext('xcodeVersionSatisfactory is true when major version exceeds minimum', () { testWithoutContext('xcodeVersionSatisfactory is true when major version exceeds minimum', () {
when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true); when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true);
when(mockXcodeProjectInterpreter.majorVersion).thenReturn(11); when(mockXcodeProjectInterpreter.majorVersion).thenReturn(12);
when(mockXcodeProjectInterpreter.minorVersion).thenReturn(2); when(mockXcodeProjectInterpreter.minorVersion).thenReturn(0);
expect(xcode.isVersionSatisfactory, isTrue); expect(xcode.isVersionSatisfactory, isTrue);
}); });
testWithoutContext('xcodeVersionSatisfactory is true when minor version exceeds minimum', () { testWithoutContext('xcodeVersionSatisfactory is true when minor version exceeds minimum', () {
when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true); when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true);
when(mockXcodeProjectInterpreter.majorVersion).thenReturn(10); when(mockXcodeProjectInterpreter.majorVersion).thenReturn(11);
when(mockXcodeProjectInterpreter.minorVersion).thenReturn(3); when(mockXcodeProjectInterpreter.minorVersion).thenReturn(3);
expect(xcode.isVersionSatisfactory, isTrue); expect(xcode.isVersionSatisfactory, isTrue);
...@@ -126,8 +126,8 @@ void main() { ...@@ -126,8 +126,8 @@ void main() {
when(processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path'])) when(processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path']))
.thenReturn(ProcessResult(1, 127, '', 'ERROR')); .thenReturn(ProcessResult(1, 127, '', 'ERROR'));
when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true); when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true);
when(mockXcodeProjectInterpreter.majorVersion).thenReturn(10); when(mockXcodeProjectInterpreter.majorVersion).thenReturn(11);
when(mockXcodeProjectInterpreter.minorVersion).thenReturn(2); when(mockXcodeProjectInterpreter.minorVersion).thenReturn(0);
expect(xcode.isInstalledAndMeetsVersionCheck, isFalse); expect(xcode.isInstalledAndMeetsVersionCheck, isFalse);
}); });
...@@ -138,8 +138,8 @@ void main() { ...@@ -138,8 +138,8 @@ void main() {
when(processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path'])) when(processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path']))
.thenReturn(ProcessResult(1, 0, xcodePath, '')); .thenReturn(ProcessResult(1, 0, xcodePath, ''));
when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true); when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true);
when(mockXcodeProjectInterpreter.majorVersion).thenReturn(9); when(mockXcodeProjectInterpreter.majorVersion).thenReturn(10);
when(mockXcodeProjectInterpreter.minorVersion).thenReturn(0); when(mockXcodeProjectInterpreter.minorVersion).thenReturn(2);
expect(xcode.isInstalledAndMeetsVersionCheck, isFalse); expect(xcode.isInstalledAndMeetsVersionCheck, isFalse);
}); });
...@@ -150,8 +150,8 @@ void main() { ...@@ -150,8 +150,8 @@ void main() {
when(processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path'])) when(processManager.runSync(<String>['/usr/bin/xcode-select', '--print-path']))
.thenReturn(ProcessResult(1, 0, xcodePath, '')); .thenReturn(ProcessResult(1, 0, xcodePath, ''));
when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true); when(mockXcodeProjectInterpreter.isInstalled).thenReturn(true);
when(mockXcodeProjectInterpreter.majorVersion).thenReturn(10); when(mockXcodeProjectInterpreter.majorVersion).thenReturn(11);
when(mockXcodeProjectInterpreter.minorVersion).thenReturn(2); when(mockXcodeProjectInterpreter.minorVersion).thenReturn(0);
expect(xcode.isInstalledAndMeetsVersionCheck, isTrue); expect(xcode.isInstalledAndMeetsVersionCheck, isTrue);
}); });
......
...@@ -366,13 +366,13 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter { ...@@ -366,13 +366,13 @@ class FakeXcodeProjectInterpreter implements XcodeProjectInterpreter {
bool get isInstalled => true; bool get isInstalled => true;
@override @override
String get versionText => 'Xcode 10.2'; String get versionText => 'Xcode 11.0';
@override @override
int get majorVersion => 10; int get majorVersion => 11;
@override @override
int get minorVersion => 2; int get minorVersion => 0;
@override @override
Future<Map<String, String>> getBuildSettings( Future<Map<String, String>> getBuildSettings(
......
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