File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ class Configurator {
284
284
'homepage: https://flutter.dev' ,
285
285
'version: 0.0.0' ,
286
286
'environment:' ,
287
- " sdk: '>=3.2.0-0 <4.0.0 '" ,
287
+ " sdk: '^${ FlutterInformation . instance . getDartSdkVersion ()} '" ,
288
288
'dependencies:' ,
289
289
for (final String package in findPackageNames (filesystem)) ' $package :\n sdk: flutter' ,
290
290
' $kPlatformIntegrationPackageName : 0.0.1' ,
@@ -1194,6 +1194,9 @@ class FlutterInformation {
1194
1194
/// Gets the name of the current branch in the Flutter framework in the repo.
1195
1195
String getBranchName () => getFlutterInformation ()['branchName' ]! as String ;
1196
1196
1197
+ /// Gets the current Dart SDK version.
1198
+ Version getDartSdkVersion () => getFlutterInformation ()['dartSdkVersion' ]! as Version ;
1199
+
1197
1200
Map <String , Object >? _cachedFlutterInformation;
1198
1201
1199
1202
/// Gets a Map of various kinds of information about the Flutter repo.
Original file line number Diff line number Diff line change @@ -338,15 +338,13 @@ void main() {
338
338
test ('.generateConfiguration generates pubspec.yaml' , () async {
339
339
configurator.generateConfiguration ();
340
340
expect (packageRoot.childFile ('pubspec.yaml' ).existsSync (), isTrue);
341
- expect (packageRoot.childFile ('pubspec.yaml' ).readAsStringSync (), contains ('flutter_gpu:' ));
342
- expect (
343
- packageRoot.childFile ('pubspec.yaml' ).readAsStringSync (),
344
- contains ('dependency_overrides:' ),
345
- );
346
- expect (
347
- packageRoot.childFile ('pubspec.yaml' ).readAsStringSync (),
348
- contains ('platform_integration:' ),
349
- );
341
+
342
+ final String pubspecContents = packageRoot.childFile ('pubspec.yaml' ).readAsStringSync ();
343
+
344
+ expect (pubspecContents, contains ('flutter_gpu:' ));
345
+ expect (pubspecContents, contains ("sdk: '^2.14.0-360.0.dev'" ));
346
+ expect (pubspecContents, contains ('dependency_overrides:' ));
347
+ expect (pubspecContents, contains ('platform_integration:' ));
350
348
});
351
349
352
350
test ('.generateConfiguration generates fake lib' , () async {
You can’t perform that action at this time.
0 commit comments