build method
Generates the outputs for a given BuildStep
.
Implementation
@override
Future<void> build(BuildStep buildStep) async {
print("generate proto ${buildStep.inputId.path}");
if (protoDir == null || (!dartEnable && !javaEnable && !ocEnable)) {
return;
}
// Read the input path to signal to the build graph that if the file changes
// then it should be rebuilt.
await buildStep.readAsString(buildStep.inputId);
await downloadDepsFuture;
await Future.wait([
_genDartCode(buildStep),
_genJavaCode(buildStep),
_genOcCode(buildStep)
]);
}