Skip to content

Commit 2e9b38d

Browse files
authored
Migrate SPM OS minimums to iOS 13, macOS 10.15 (#168153)
iOS deployment target was migrated from 12 to 13 in: * flutter/flutter#167737 macOS deployment target was migrated from 10.14 to 10.15 in: * flutter/flutter#168101 Issue: flutter/flutter#167735 Issue: flutter/flutter#167745 ## Pre-launch Checklist - [X] I read the [Contributor Guide] and followed the process outlined there for submitting PRs. - [X] I read the [Tree Hygiene] wiki page, which explains my responsibilities. - [X] I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement]. - [X] I signed the [CLA]. - [X] I listed at least one issue that this PR fixes in the description above. - [X] I updated/added relevant documentation (doc comments with `///`). - [X] I added new tests to check the change I am making, or this PR is [test-exempt]. - [X] I followed the [breaking change policy] and added [Data Driven Fixes] where supported. - [X] All existing and new tests are passing. If you need help, consider asking for advice on the #hackers-new channel on [Discord]. <!-- Links --> [Contributor Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview [Tree Hygiene]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md [test-exempt]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests [Flutter Style Guide]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md [Features we expect every widget to implement]: https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md [Data Driven Fixes]: https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
1 parent a794b98 commit 2e9b38d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

packages/flutter_tools/lib/src/macos/swift_package_manager.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ class SwiftPackageManager {
3333
static final SwiftPackageSupportedPlatform iosSwiftPackageSupportedPlatform =
3434
SwiftPackageSupportedPlatform(
3535
platform: SwiftPackagePlatform.ios,
36-
version: Version(12, 0, null),
36+
version: Version(13, 0, null),
3737
);
3838

3939
static final SwiftPackageSupportedPlatform macosSwiftPackageSupportedPlatform =
4040
SwiftPackageSupportedPlatform(
4141
platform: SwiftPackagePlatform.macos,
42-
version: Version(10, 14, null),
42+
version: Version(10, 15, null),
4343
);
4444

4545
/// Creates a Swift Package called 'FlutterGeneratedPluginSwiftPackage' that

packages/flutter_tools/test/general.shard/macos/swift_package_manager_test.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void main() {
8080
await spm.generatePluginsSwiftPackage(<Plugin>[], platform, project);
8181

8282
final String supportedPlatform =
83-
platform == SupportedPlatform.ios ? '.iOS("12.0")' : '.macOS("10.14")';
83+
platform == SupportedPlatform.ios ? '.iOS("13.0")' : '.macOS("10.15")';
8484
expect(project.flutterPluginSwiftPackageManifest.existsSync(), isTrue);
8585
expect(project.flutterPluginSwiftPackageManifest.readAsStringSync(), '''
8686
// swift-tools-version: 5.9
@@ -133,7 +133,7 @@ $_doubleIndent
133133
await spm.generatePluginsSwiftPackage(<Plugin>[validPlugin1], platform, project);
134134

135135
final String supportedPlatform =
136-
platform == SupportedPlatform.ios ? '.iOS("12.0")' : '.macOS("10.14")';
136+
platform == SupportedPlatform.ios ? '.iOS("13.0")' : '.macOS("10.15")';
137137
expect(project.flutterPluginSwiftPackageManifest.existsSync(), isTrue);
138138
expect(project.flutterPluginSwiftPackageManifest.readAsStringSync(), '''
139139
// swift-tools-version: 5.9
@@ -223,7 +223,7 @@ let package = Package(
223223
);
224224

225225
final String supportedPlatform =
226-
platform == SupportedPlatform.ios ? '.iOS("12.0")' : '.macOS("10.14")';
226+
platform == SupportedPlatform.ios ? '.iOS("13.0")' : '.macOS("10.15")';
227227
expect(project.flutterPluginSwiftPackageManifest.existsSync(), isTrue);
228228
expect(project.flutterPluginSwiftPackageManifest.readAsStringSync(), '''
229229
// swift-tools-version: 5.9
@@ -268,7 +268,7 @@ let package = Package(
268268
fileSystem: fs,
269269
);
270270
final String supportedPlatform =
271-
platform == SupportedPlatform.ios ? '.iOS("12.0")' : '.macOS("10.14")';
271+
platform == SupportedPlatform.ios ? '.iOS("13.0")' : '.macOS("10.15")';
272272
project.flutterPluginSwiftPackageManifest.createSync(recursive: true);
273273
project.flutterPluginSwiftPackageManifest.writeAsStringSync(supportedPlatform);
274274
SwiftPackageManager.updateMinimumDeployment(
@@ -289,7 +289,7 @@ let package = Package(
289289
fileSystem: fs,
290290
);
291291
final String supportedPlatform =
292-
platform == SupportedPlatform.ios ? '.iOS("12.0")' : '.macOS("10.14")';
292+
platform == SupportedPlatform.ios ? '.iOS("13.0")' : '.macOS("10.15")';
293293
project.flutterPluginSwiftPackageManifest.createSync(recursive: true);
294294
project.flutterPluginSwiftPackageManifest.writeAsStringSync(supportedPlatform);
295295
SwiftPackageManager.updateMinimumDeployment(
@@ -310,13 +310,13 @@ let package = Package(
310310
fileSystem: fs,
311311
);
312312
final String supportedPlatform =
313-
platform == SupportedPlatform.ios ? '.iOS("12.0")' : '.macOS("10.14")';
313+
platform == SupportedPlatform.ios ? '.iOS("13.0")' : '.macOS("10.15")';
314314
project.flutterPluginSwiftPackageManifest.createSync(recursive: true);
315315
project.flutterPluginSwiftPackageManifest.writeAsStringSync(supportedPlatform);
316316
SwiftPackageManager.updateMinimumDeployment(
317317
project: project,
318318
platform: platform,
319-
deploymentTarget: platform == SupportedPlatform.ios ? '12.0' : '10.14',
319+
deploymentTarget: platform == SupportedPlatform.ios ? '13.0' : '10.15',
320320
);
321321
expect(
322322
project.flutterPluginSwiftPackageManifest.readAsLinesSync(),
@@ -331,7 +331,7 @@ let package = Package(
331331
fileSystem: fs,
332332
);
333333
final String supportedPlatform =
334-
platform == SupportedPlatform.ios ? '.iOS("12.0")' : '.macOS("10.14")';
334+
platform == SupportedPlatform.ios ? '.iOS("13.0")' : '.macOS("10.15")';
335335
project.flutterPluginSwiftPackageManifest.createSync(recursive: true);
336336
project.flutterPluginSwiftPackageManifest.writeAsStringSync(supportedPlatform);
337337
SwiftPackageManager.updateMinimumDeployment(

0 commit comments

Comments
 (0)