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
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user