The Dart gRPC stubs and message classes are generated from protobuf definitions. To regenerate them, you need to have the following prerequisites:
Prerequisites
- Cloned repositories for both googleapis/googleapis and google/protobuf.
protoc version 3.0.0 or higher on your PATH.- Dart
protoc_plugin version 0.7.9 or higher on your PATH.
Installation
To install the Dart protoc plugin, run:
pub global activate protoc_plugin
Ensure ~/.pub-cache/bin is added to your PATH.
Regeneration Steps
- Set the
PROTOBUF environment variable to the path of your google/protobuf clone. - Set the
GOOGLEAPIS environment variable to the path of your googleapis/googleapis clone. - Run the regeneration script:
tool/regenerate.sh
# Install plugin
$ pub global activate protoc_plugin
# Set environment variables and regenerate
$ export PROTOBUF=/path/to/google/protobuf
$ export GOOGLEAPIS=/path/to/googleapis/googleapis
$ tool/regenerate.sh