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