The main configuration block exposed as protobuf in the build script.
| Modifiers | Name | Description |
|---|---|---|
class |
ProtobufConfigurator.AndroidGenerateProtoTaskCollection |
|
class |
ProtobufConfigurator.GenerateProtoTaskCollection |
|
class |
ProtobufConfigurator.JavaGenerateProtoTaskCollection |
| Type | Name and description |
|---|---|
java.lang.String |
generatedFilesBaseDirThe base directory of generated files. |
| Constructor and description |
|---|
ProtobufConfigurator
(org.gradle.api.Project project, org.gradle.api.internal.file.FileResolver fileResolver) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
generateProtoTasks(groovy.lang.Closure configureClosure)Configures the generateProto tasks in the given closure. |
|
ProtobufConfigurator.GenerateProtoTaskCollection |
getGenerateProtoTasks()Returns the collection of generateProto tasks. |
|
void |
plugins(groovy.lang.Closure configureClosure)Locate the codegen plugin executables. |
|
void |
protoc(groovy.lang.Closure configureClosure)Locates the protoc executable. |
|
void |
runTaskConfigClosures() |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The base directory of generated files. The default is "${project.buildDir}/generated/source/proto".
Configures the generateProto tasks in the given closure.
The closure will be manipulating a JavaGenerateProtoTaskCollection or an AndroidGenerateProtoTaskCollection depending on whether the project is Java or Android.
You should only change the generateProto tasks in this closure. Do not change the task in your own afterEvaluate closure, as the change may not be picked up correctly by the wired javaCompile task.
Returns the collection of generateProto tasks. Note the tasks are available only after project evaluation.
Do not try to change the tasks other than in the closure provided to generateProtoTasks(Closure). The reason is explained in the comments for the linked method.
Locate the codegen plugin executables. The closure will be manipulating a
NamedDomainObjectContainer
Locates the protoc executable. The closure will be manipulating an ExecutableLocator.
Groovy Documentation