@@ -201,12 +201,19 @@ class $dartPluginClass {
201
201
if (! podspecContent.contains (versionString)) {
202
202
throw TaskResult .failure ('Update this test to match plugin minimum $target deployment version' );
203
203
}
204
- podspecContent = podspecContent.replaceFirst (
205
- versionString,
206
- target == 'ios'
207
- ? "s.platform = :ios, '10.0'"
208
- : "s.platform = :osx, '10.8'"
209
- );
204
+ // Add transitive dependency on AppAuth 1.6 targeting iOS 8 and macOS 10.9, which no longer builds in Xcode
205
+ // to test the version is forced higher and builds.
206
+ const String iosContent = '''
207
+ s.platform = :ios, '10.0'
208
+ s.dependency 'AppAuth', '1.6.0'
209
+ ''' ;
210
+
211
+ const String macosContent = '''
212
+ s.platform = :osx, '10.8'
213
+ s.dependency 'AppAuth', '1.6.0'
214
+ ''' ;
215
+
216
+ podspecContent = podspecContent.replaceFirst (versionString, target == 'ios' ? iosContent : macosContent);
210
217
podspec.writeAsStringSync (podspecContent, flush: true );
211
218
}
212
219
@@ -226,7 +233,8 @@ class $dartPluginClass {
226
233
// but the range of supported deployment target versions is 9.0 to 14.0.99.
227
234
//
228
235
// (or "The macOS deployment target 'MACOSX_DEPLOYMENT_TARGET'"...)
229
- if (buildOutput.contains ('the range of supported deployment target versions' )) {
236
+ if (buildOutput.contains ('is set to 10.0, but the range of supported deployment target versions' ) ||
237
+ buildOutput.contains ('is set to 10.8, but the range of supported deployment target versions' )) {
230
238
throw TaskResult .failure ('Minimum plugin version warning present' );
231
239
}
232
240
@@ -244,15 +252,23 @@ class $dartPluginClass {
244
252
if (podsProjectContent.contains ('IPHONEOS_DEPLOYMENT_TARGET = 10' )) {
245
253
throw TaskResult .failure ('Plugin build setting IPHONEOS_DEPLOYMENT_TARGET not removed' );
246
254
}
255
+ // Transitive dependency AppAuth targeting too-low 8.0 was not fixed.
256
+ if (podsProjectContent.contains ('IPHONEOS_DEPLOYMENT_TARGET = 8' )) {
257
+ throw TaskResult .failure ('Transitive dependency build setting IPHONEOS_DEPLOYMENT_TARGET=8 not removed' );
258
+ }
247
259
if (! podsProjectContent.contains (r'"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "$(inherited) i386";' )) {
248
260
throw TaskResult .failure (r'EXCLUDED_ARCHS is not "$(inherited) i386"' );
249
261
}
250
- }
251
-
252
- // Same for macOS deployment target, but 10.8.
253
- // The plugintest target should not have MACOSX_DEPLOYMENT_TARGET set.
254
- if (target == 'macos' && podsProjectContent.contains ('MACOSX_DEPLOYMENT_TARGET = 10.8' )) {
255
- throw TaskResult .failure ('Plugin build setting MACOSX_DEPLOYMENT_TARGET not removed' );
262
+ } else if (target == 'macos' ) {
263
+ // Same for macOS deployment target, but 10.8.
264
+ // The plugintest target should not have MACOSX_DEPLOYMENT_TARGET set.
265
+ if (podsProjectContent.contains ('MACOSX_DEPLOYMENT_TARGET = 10.8' )) {
266
+ throw TaskResult .failure ('Plugin build setting MACOSX_DEPLOYMENT_TARGET not removed' );
267
+ }
268
+ // Transitive dependency AppAuth targeting too-low 10.9 was not fixed.
269
+ if (podsProjectContent.contains ('MACOSX_DEPLOYMENT_TARGET = 10.9' )) {
270
+ throw TaskResult .failure ('Transitive dependency build setting MACOSX_DEPLOYMENT_TARGET=10.9 not removed' );
271
+ }
256
272
}
257
273
}
258
274
}
0 commit comments