public abstract class CodeGenerationAction
extends java.lang.Object
implements org.gradle.api.Action<org.gradle.api.Task>, io.spine.logging.Logging
Modifier | Constructor and Description |
---|---|
protected |
CodeGenerationAction(org.gradle.api.Project project,
java.util.function.Supplier<io.spine.code.proto.FileSet> files,
java.util.function.Supplier<java.lang.String> targetDirPath,
java.util.function.Supplier<java.lang.String> protoSrcDirPath)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected abstract io.spine.code.gen.Indent |
getIndent(org.gradle.api.Project project)
Obtains indentation configuration from the project.
|
protected io.spine.code.gen.Indent |
indent()
Obtains indentation to be used for code generation.
|
protected org.gradle.api.Project |
project()
Obtains the project for which the code is generated.
|
protected java.util.function.Supplier<io.spine.code.proto.FileSet> |
protoFiles()
Obtains the Protobuf files to be processed.
|
protected java.io.File |
protoSrcDir()
Obtains directory with source proto files.
|
protected java.io.File |
targetDir()
Obtains directory under which the generated source will be placed.
|
protected CodeGenerationAction(org.gradle.api.Project project, java.util.function.Supplier<io.spine.code.proto.FileSet> files, java.util.function.Supplier<java.lang.String> targetDirPath, java.util.function.Supplier<java.lang.String> protoSrcDirPath)
project
- the project for which we generated the codefiles
- the supplier of the Protobuf files, which (as other suppliers passed
to the constructor) is dynamically evaluated when the task is executedtargetDirPath
- the supplier of the path of the directory for the generated sourcesprotoSrcDirPath
- the supplier of the path of the directory with .proto
filesprotected final io.spine.code.gen.Indent indent()
protected abstract io.spine.code.gen.Indent getIndent(org.gradle.api.Project project)
protected final org.gradle.api.Project project()
protected final java.util.function.Supplier<io.spine.code.proto.FileSet> protoFiles()
protected final java.io.File protoSrcDir()
protected final java.io.File targetDir()