Unverified Commit 4a2ed22b authored by Stanislav Baranov's avatar Stanislav Baranov Committed by GitHub

Propagate flutter tool verbose flag through gradle to flutter build bundle. (#18246)

parent 4bbd4ce9
......@@ -256,6 +256,10 @@ class FlutterPlugin implements Plugin<Project> {
target = project.property('target')
}
Boolean verboseValue = null
if (project.hasProperty('verbose')) {
verboseValue = project.property('verbose').toBoolean()
}
Boolean previewDart2Value = true
if (project.hasProperty('preview-dart-2')) {
previewDart2Value = project.property('preview-dart-2').toBoolean()
......@@ -310,6 +314,7 @@ class FlutterPlugin implements Plugin<Project> {
localEngine this.localEngine
localEngineSrcPath this.localEngineSrcPath
targetPath target
verbose verboseValue
previewDart2 previewDart2Value
fileSystemRoots fileSystemRootsValue
fileSystemScheme fileSystemSchemeValue
......@@ -353,6 +358,8 @@ abstract class BaseFlutterTask extends DefaultTask {
@Input
String targetPath
@Optional @Input
Boolean verbose
@Optional @Input
Boolean previewDart2
@Optional @Input
String[] fileSystemRoots
......@@ -442,6 +449,9 @@ abstract class BaseFlutterTask extends DefaultTask {
args "build", "bundle"
args "--suppress-analytics"
args "--target", targetPath
if (verbose) {
args "--verbose"
}
if (previewDart2) {
args "--preview-dart-2"
} else {
......
......@@ -314,7 +314,9 @@ Future<Null> _buildGradleProjectV2(String gradle, BuildInfo buildInfo, String ta
final Status status = logger.startProgress('Running \'gradlew $assembleTask\'...', expectSlowOperation: true);
final String gradlePath = fs.file(gradle).absolute.path;
final List<String> command = <String>[gradlePath];
if (!logger.isVerbose) {
if (logger.isVerbose) {
command.add('-Pverbose=true');
} else {
command.add('-q');
}
if (artifacts is LocalEngineArtifacts) {
......
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