collectProtocArguments method
Collect all arguments to be added to the "protoc" call. This method has been explicitly extracted so it can be easily overridden in unit tests, where we may need to exert some extra control.
Implementation
List<String> collectProtocArguments(
File protocPlugin, String pluginParameters, String inputPath) {
return <String>[
if (protocPlugin.path.isNotEmpty)
'--plugin=protoc-gen-dart=${protocPlugin.path}',
'--dart_out=$pluginParameters${path.join('.', outputDirectory)}',
...protoPaths
.map((protoPath) => '--proto_path=${path.join('.', protoPath)}'),
path.join('.', inputPath),
];
}