From 51588ab80822a9972742597af56e5cd0212149fa Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Thu, 9 Sep 2021 20:42:03 -0700 Subject: [PATCH] Set plugin template minimum Flutter SDK to 2.5 (#89695) --- .../templates/plugin/ios-objc.tmpl/projectName.podspec.tmpl | 2 +- .../plugin/ios-swift.tmpl/projectName.podspec.tmpl | 2 +- packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl | 2 +- .../test/commands.shard/permeable/create_test.dart | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/flutter_tools/templates/plugin/ios-objc.tmpl/projectName.podspec.tmpl b/packages/flutter_tools/templates/plugin/ios-objc.tmpl/projectName.podspec.tmpl index a6800cb5e3..6f0a53c7b8 100644 --- a/packages/flutter_tools/templates/plugin/ios-objc.tmpl/projectName.podspec.tmpl +++ b/packages/flutter_tools/templates/plugin/ios-objc.tmpl/projectName.podspec.tmpl @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.source_files = 'Classes/**/*' s.public_header_files = 'Classes/**/*.h' s.dependency 'Flutter' - s.platform = :ios, '8.0' + s.platform = :ios, '9.0' # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } diff --git a/packages/flutter_tools/templates/plugin/ios-swift.tmpl/projectName.podspec.tmpl b/packages/flutter_tools/templates/plugin/ios-swift.tmpl/projectName.podspec.tmpl index 7cbd143baa..1760c3f698 100644 --- a/packages/flutter_tools/templates/plugin/ios-swift.tmpl/projectName.podspec.tmpl +++ b/packages/flutter_tools/templates/plugin/ios-swift.tmpl/projectName.podspec.tmpl @@ -15,7 +15,7 @@ Pod::Spec.new do |s| s.source = { :path => '.' } s.source_files = 'Classes/**/*' s.dependency 'Flutter' - s.platform = :ios, '8.0' + s.platform = :ios, '9.0' # Flutter.framework does not contain a i386 slice. s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386' } diff --git a/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl b/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl index 3737e6ec87..3c3d150c0c 100644 --- a/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl +++ b/packages/flutter_tools/templates/plugin/pubspec.yaml.tmpl @@ -5,7 +5,7 @@ homepage: environment: sdk: {{dartSdkVersionBounds}} - flutter: ">=1.20.0" + flutter: ">=2.5.0" dependencies: flutter: diff --git a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart index 39f184909d..10d7f34fa0 100755 --- a/packages/flutter_tools/test/commands.shard/permeable/create_test.dart +++ b/packages/flutter_tools/test/commands.shard/permeable/create_test.dart @@ -2325,7 +2325,7 @@ void main() { Logger: () => logger, }); - testUsingContext('newly created plugin has min flutter sdk version as 1.20.0', () async { + testUsingContext('newly created plugin has min flutter sdk version as 2.5.0', () async { Cache.flutterRoot = '../..'; final CreateCommand command = CreateCommand(); @@ -2334,8 +2334,8 @@ void main() { final String rawPubspec = await projectDir.childFile('pubspec.yaml').readAsString(); final Pubspec pubspec = Pubspec.parse(rawPubspec); final Map env = pubspec.environment; - expect(env['flutter'].allows(Version(1, 20, 0)), true); - expect(env['flutter'].allows(Version(1, 19, 0)), false); + expect(env['flutter'].allows(Version(2, 5, 0)), true); + expect(env['flutter'].allows(Version(2, 4, 9)), false); }); testUsingContext('default app uses Android SDK 30', () async {