A separate Gradle project with ProtoData plugins which generate
MessageField,
MessageOneof,
and MessageDef
implementations for Proto messages. Also, some other useful Kotlin extensions are generated,
e.g. ValidatingBuilder.messageDef()
that returns the instance of MessageDef
implementation
for the current message builder.
The separate Gradle project is needed because the ProtoData plugins,
which generate the code, require the newer version of Gradle, 7.6.x
at the moment,
comparing to Chords-based projects, which require Gradle version 6.9.x
.
- Java 11
- Gradle
7.6.x
The Chords Gradle plugin
should be used to apply codegen-plugins
to a project.
The following files are copied to the resources/codegen-workspace folder during the build:
buildSrc
folder.- Gradle wrapper files.
These resources will be packaged into the resulting jar and then used by the Gradle plugin to create a placeholder module for code generation.
This is necessary for the following reasons:
- The Gradle plugin may not keep another copy of these files.
- There is no need to synchronize dependencies between
codegen-plugins
project and the Gradle plugin.
- codegen-plugins — the ProtoData plugins generating the code.