public class JkProtoc
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static dev.jeka.core.api.depmanagement.JkModuleId |
PROTOBUF_MODULE
Module coordinate that should be included in the project as a compile-time dependency in order
to use the generated classes.
|
static java.lang.String |
PROTOC_JAR_VERSION |
| Modifier and Type | Method and Description |
|---|---|
JkProtoc |
addOptions(java.lang.String... options)
Options to be passed to the protoc compiler.
|
JkProtoc |
addProtoPath(java.nio.file.Path path)
Add a location of which to search for import.
|
void |
compile(dev.jeka.core.api.file.JkPathTreeSet protoFiles,
java.lang.String... extraOptions)
Compiles the specified proto files.
|
void |
compile(java.util.List<java.nio.file.Path> protoFiles,
java.lang.String... extraOptions)
Compiles the specified proto files.
|
void |
compile(java.nio.file.Path protoFileDir,
java.lang.String... extraOptions)
Compiles the specified proto files.
|
static JkProtoc |
of() |
static JkProtoc |
ofJava(java.nio.file.Path outputPath) |
JkProtoc |
setJavaOutputDir(java.nio.file.Path path)
The location of the generated Java sources.
|
JkProtoc |
setLogCommand(boolean logCommand) |
JkProtoc |
setLogOutput(boolean logOutput) |
JkProtoc |
setProtocJarVersion(java.lang.String protocJarVersion)
Sets the version of the Java implementation for the protoc compiler.
|
JkProtoc |
setRepos(dev.jeka.core.api.depmanagement.JkRepoSet repos)
Sets the repositories to fretch the protoc jar compiler from.
|
public static final dev.jeka.core.api.depmanagement.JkModuleId PROTOBUF_MODULE
public static final java.lang.String PROTOC_JAR_VERSION
public static JkProtoc of()
public static JkProtoc ofJava(java.nio.file.Path outputPath)
public void compile(dev.jeka.core.api.file.JkPathTreeSet protoFiles,
java.lang.String... extraOptions)
protoFiles - The proto files to compile.extraOptions - Extra options to path to the protoc compiler.public void compile(java.nio.file.Path protoFileDir,
java.lang.String... extraOptions)
protoFileDir - The repository where lies proto files to compile.extraOptions - Extra options to path to the protoc compiler.public void compile(java.util.List<java.nio.file.Path> protoFiles,
java.lang.String... extraOptions)
protoFiles - The proto files to compile.extraOptions - Extra options to path to the protoc compiler.public JkProtoc setJavaOutputDir(java.nio.file.Path path)
public JkProtoc addProtoPath(java.nio.file.Path path)
See : https://manpages.ubuntu.com/manpages/xenial/man1/protoc.1.html
public JkProtoc addOptions(java.lang.String... options)
public JkProtoc setRepos(dev.jeka.core.api.depmanagement.JkRepoSet repos)
public JkProtoc setProtocJarVersion(java.lang.String protocJarVersion)
public JkProtoc setLogCommand(boolean logCommand)
public JkProtoc setLogOutput(boolean logOutput)