Adds the protobuf {} block as a property of the project.
| Modifiers | Name | Description |
|---|---|---|
class |
ProtobufExtension.GenerateProtoTaskCollection |
| Type | Name and description |
|---|---|
java.lang.String |
generatedFilesBaseDir |
| Constructor and description |
|---|
ProtobufExtension
(org.gradle.api.Project project) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
generateProtoTasks(org.gradle.api.Action<GenerateProtoTaskCollection> configureAction)Configures the generateProto tasks in the given closure. |
|
ProtobufExtension.GenerateProtoTaskCollection |
getGenerateProtoTasks()Returns the collection of generateProto tasks. |
|
java.lang.String |
getGeneratedFilesBaseDir() |
|
void |
plugins(org.gradle.api.Action<org.gradle.api.NamedDomainObjectContainer<ExecutableLocator>> configureAction)Locate the codegen plugin executables. |
|
void |
protoc(org.gradle.api.Action<ExecutableLocator> configureAction)Locates the protoc executable. |
|
void |
setGeneratedFilesBaseDir(java.lang.String generatedFilesBaseDir) |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), 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() |
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