By default, the generated Java files are located in the $ generateFilesBaseDir / $ sourceSet / $ builtinPluginName directory, where $ generateFilesBaseDir is by default $ buildDir / generated / source / proto and is configured. For instance,
protobuf { ... generatedFilesBaseDir = "$projectDir/src/generated" }
The name of the subdirectory, which is $ builtinPluginName by default, can also be changed by setting the outputSubDir property in the unit of built-in or plug-in task configuration modules in the generateProtoTasks block (see the previous section). For instance,
{ task -> task.plugins { grpc { // Write the generated files under // "$generatedFilesBaseDir/$sourceSet/grpcjava" outputSubDir = 'grpcjava' } } }
to see github protobuf-gradle-plugin
source share