Unverified Commit cd294666 authored by hy's avatar hy Committed by GitHub

Add --dart-define option support to build aar command (#71829)

parent cd452286
......@@ -40,6 +40,7 @@ class BuildAarCommand extends BuildSubCommand {
usesPubOption();
addSplitDebugInfoOption();
addDartObfuscationOption();
usesDartDefineOption();
usesTrackWidgetCreation(verboseHelp: false);
addNullSafetyModeOptions(hide: !verboseHelp);
addEnableExperimentation(hide: !verboseHelp);
......
......@@ -176,6 +176,7 @@ void main() {
'--split-debug-info',
'/project-name/v1.2.3/',
'--obfuscate',
'--dart-define=foo=bar'
],
);
......@@ -196,6 +197,7 @@ void main() {
expect(buildInfo.flavor, 'free');
expect(buildInfo.splitDebugInfoPath, '/project-name/v1.2.3/');
expect(buildInfo.dartObfuscation, isTrue);
expect(buildInfo.dartDefines.contains('foo=bar'), isTrue);
}, overrides: <Type, Generator>{
AndroidBuilder: () => mockAndroidBuilder,
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment