co.tomlee.gradle.plugins.protoc.GradleProtocPluginExtension.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-protoc-plugin Show documentation
Show all versions of gradle-protoc-plugin Show documentation
Gradle plugin for protoc, the code generator typically associated with Google's Protocol Buffers
package co.tomlee.gradle.plugins.protoc
import org.gradle.api.Project;
class GradleProtocPluginExtension {
String executable = "protoc"
List path = []
final Project project
public GradleProtocPluginExtension(final Project project) {
this.project = project
}
def executable(String executable) {
this.executable = executable
}
def path(String path) {
final File file = new File(path)
if (file.isAbsolute()) {
this.path << file
}
else {
this.path << project.file(path)
}
}
def path(File path) {
this.path << path
}
}