@@ -230,6 +230,7 @@ void main() {
230
230
treeShakeIcons: true ,
231
231
trackWidgetCreation: true ,
232
232
dartDefines: < String > ['foo=2' , 'bar=2' ],
233
+ dartDefineConfigJsonMap: < String , Object > {'baz' : '2' },
233
234
dartObfuscation: true ,
234
235
splitDebugInfoPath: 'foo/' ,
235
236
extraFrontEndOptions: < String > ['--enable-experiment=non-nullable' , 'bar' ],
@@ -252,6 +253,7 @@ void main() {
252
253
'-Pcode-size-directory=foo/code-size' ,
253
254
'-Pfoo=bar' ,
254
255
'-Pfizz=bazz' ,
256
+ '-Pbaz=2' ,
255
257
]);
256
258
});
257
259
@@ -287,7 +289,7 @@ void main() {
287
289
treeShakeIcons: true ,
288
290
trackWidgetCreation: true ,
289
291
dartDefines: < String > ['foo=2' , 'bar=2' ],
290
- dartDefineConfigJsonMap: < String ,Object > { 'DART_DEFINES' : 'Define a variable, but it occupies the variable name of the system' },
292
+ dartDefineConfigJsonMap: < String , Object > {'DART_DEFINES' : 'Define a variable, but it occupies the variable name of the system' },
291
293
dartObfuscation: true ,
292
294
);
293
295
buildInfo.toEnvironmentConfig ();
@@ -313,11 +315,11 @@ void main() {
313
315
treeShakeIcons: true ,
314
316
trackWidgetCreation: true ,
315
317
dartDefines: < String > ['foo=2' , 'bar=2' ],
316
- dartDefineConfigJsonMap: < String ,Object > { 'dart-defines' : 'Define a variable, but it occupies the variable name of the system' },
318
+ dartDefineConfigJsonMap: < String , Object > {'dart-defines' : 'Define a variable, but it occupies the variable name of the system' },
317
319
dartObfuscation: true ,
318
320
);
319
321
buildInfo.toGradleConfig ();
320
- expect (testLogger.warningText, contains ('he key: [dart-defines] already exists, you cannot use gradle variables that have been used by the system' ));
322
+ expect (testLogger.warningText, contains ('The key: [dart-defines] already exists, you cannot use gradle variables that have been used by the system' ));
321
323
});
322
324
323
325
testUsingContext ('toGradleConfig repeated variable with not set' , () async {
@@ -326,23 +328,23 @@ void main() {
326
328
treeShakeIcons: true ,
327
329
trackWidgetCreation: true ,
328
330
dartDefines: < String > ['dart-defines=Define a variable, but it occupies the variable name of the system' ],
329
- dartDefineConfigJsonMap: < String ,Object > { 'dart-defines' : 'Define a variable, but it occupies the variable name of the system' },
331
+ dartDefineConfigJsonMap: < String , Object > {'dart-defines' : 'Define a variable, but it occupies the variable name of the system' },
330
332
dartObfuscation: true ,
331
333
);
332
334
buildInfo.toGradleConfig ();
333
- expect (testLogger.warningText, contains ('he key: [dart-defines] already exists, you cannot use gradle variables that have been used by the system' ));
335
+ expect (testLogger.warningText, contains ('The key: [dart-defines] already exists, you cannot use gradle variables that have been used by the system' ));
334
336
});
335
337
336
338
testUsingContext ('toGradleConfig with androidProjectArgs override gradle project variant' , () async {
337
339
const BuildInfo buildInfo = BuildInfo (BuildMode .debug, '' ,
338
340
treeShakeIcons: true ,
339
341
trackWidgetCreation: true ,
340
342
androidProjectArgs: < String > ['applicationId=com.google' ],
341
- dartDefineConfigJsonMap: < String ,Object > { 'applicationId' : 'override applicationId' },
343
+ dartDefineConfigJsonMap: < String , Object > {'applicationId' : 'override applicationId' },
342
344
dartObfuscation: true ,
343
345
);
344
346
buildInfo.toGradleConfig ();
345
- expect (testLogger.warningText, contains ('The key: [applicationId] already exists, you cannot use gradle variables that have been used' ));
347
+ expect (testLogger.warningText, contains ('The key: [applicationId] already exists, you cannot use gradle variables that have been used by the system ' ));
346
348
});
347
349
348
350
});
0 commit comments