This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree 2 files changed +17
-7
lines changed 2 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -288,6 +288,11 @@ dev_dependencies:${_pubspecMapString(pubspec.devDependencies)}
288
288
}
289
289
290
290
Future <void > _updateMacosPodfile () async {
291
+ // Only change the macOS deployment target if the host platform is macOS.
292
+ if (! io.Platform .isMacOS) {
293
+ return ;
294
+ }
295
+
291
296
final File podfileFile =
292
297
app.platformDirectory (FlutterPlatform .macos).childFile ('Podfile' );
293
298
if (! podfileFile.existsSync ()) {
Original file line number Diff line number Diff line change @@ -103,23 +103,28 @@ void main() {
103
103
baselinePubspec.environment? [dartSdkKey]);
104
104
});
105
105
106
- test ('macOS deployment target is modified' , () async {
106
+ test ('macOS deployment target is modified in Podfile ' , () async {
107
107
await runCapturingPrint (runner, < String > ['all-plugins-app' ]);
108
-
109
108
final List <String > podfile = command.app
110
109
.platformDirectory (FlutterPlatform .macos)
111
110
.childFile ('Podfile' )
112
111
.readAsLinesSync ();
113
- final List <String > pbxproj = command.app
114
- .platformDirectory (FlutterPlatform .macos)
115
- .childDirectory ('Runner.xcodeproj' )
116
- .childFile ('project.pbxproj' )
117
- .readAsLinesSync ();
118
112
119
113
expect (
120
114
podfile,
121
115
everyElement ((String line) =>
122
116
! line.contains ('platform :osx' ) || line.contains ("'10.15'" )));
117
+ },
118
+ // Podfile is only generated on macOS.
119
+ skip: ! io.Platform .isMacOS);
120
+
121
+ test ('macOS deployment target is modified in pbxproj' , () async {
122
+ await runCapturingPrint (runner, < String > ['all-plugins-app' ]);
123
+ final List <String > pbxproj = command.app
124
+ .platformDirectory (FlutterPlatform .macos)
125
+ .childDirectory ('Runner.xcodeproj' )
126
+ .childFile ('project.pbxproj' )
127
+ .readAsLinesSync ();
123
128
124
129
expect (
125
130
pbxproj,
You can’t perform that action at this time.
0 commit comments