public abstract class TemplateOperation.InitOperation extends Object
TemplateOperation.createGradleInit(java.io.File, java.lang.String)
operation. At the end call TemplateOperation.InitOperation.add()
to finish the operation and
add it to the list of TemplateOperation.OperationStep
s to perform.Modifier and Type | Method and Description |
---|---|
void |
add()
Add the operation to the list of
TemplateOperation.OperationStep s to perform. |
abstract TemplateOperation.InitOperation |
basePackage(String pkg)
Specify base package of the project
|
abstract TemplateOperation.InitOperation |
comments(Boolean comments)
Specify whether create comments in the generated files.
|
abstract TemplateOperation.InitOperation |
dsl(String dsl)
Specify the type of DSL to use.
|
abstract TemplateOperation.InitOperation |
javaVersion(String version)
Specify the Java version the project would be compiled, tested,
and executed with.
|
abstract TemplateOperation.InitOperation |
projectName(String name)
Specify project name.
|
abstract TemplateOperation.InitOperation |
testFramework(String testFramework)
Specify the type of test framework.
|
public final void add()
TemplateOperation.OperationStep
s to perform.public abstract TemplateOperation.InitOperation dsl(String dsl)
dsl
- either groovy
or kotlin
public abstract TemplateOperation.InitOperation testFramework(String testFramework)
testFramework
- junit-jupiter
, spock
, testng
public abstract TemplateOperation.InitOperation basePackage(String pkg)
pkg
- base package for the sourcespublic abstract TemplateOperation.InitOperation projectName(String name)
name
- the (logical) name of the projectpublic abstract TemplateOperation.InitOperation javaVersion(String version)
version
- the Java version to be usedpublic abstract TemplateOperation.InitOperation comments(Boolean comments)
comments
- set false
to generate more compact project files.