Let's generate stubs for a few languages. Create the file
the root of the repository:
This will generate Java stubs to
gen/java, and C++ stubs to
Behind the scenes, this command:
- Discovers all Protobuf files per your configuration.
- Copies all Protobuf file content into memory.
- Compiles all Protobuf files.
- Splits the compiled result into chunks per directory, and invokes the
java and cpp
protocbuilt-in plugins per directory in parallel.
- Combines the result, and writes to the given directories per the template.
Feel free to experiment with other plugins as well.
When you are done, run
rm -rf gen to clean up your work.