Class InitBuild
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.buildinit.tasks.InitBuild
- All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, org.gradle.util.Configurable<Task>
Generates a Gradle project structure.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Task
Task.Namer -
Field Summary
Fields inherited from interface Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAvailable build script DSLs to be used.Available test frameworks.getDsl()The desired DSL of build scripts to create, defaults to 'groovy'.The name of the package to use for generated source.org.gradle.buildinit.plugins.internal.ProjectLayoutSetupRegistryThe name of the generated project, defaults to the name of the directory the project is generated in.The test framework to be used in the generated project.getType()The desired type of project to generate, defaults to 'pom' if a 'pom.xml' is found in the project root and if no 'pom.xml' is found, it defaults to 'basic'.voidSet the build script DSL to be used.voidsetPackageName(String packageName) Set the package name.voidsetProjectName(String projectName) Set the project name.voidsetTestFramework(String testFramework) Set the test framework to be used.voidvoidMethods inherited from class DefaultTask
newInputDirectory, newInputFile, newOutputDirectory, newOutputFileMethods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString
-
Constructor Details
-
InitBuild
public InitBuild()
-
-
Method Details
-
getType
-
getDsl
The desired DSL of build scripts to create, defaults to 'groovy'. This property can be set via command-line option '--dsl'.- Since:
- 4.5
-
getProjectName
The name of the generated project, defaults to the name of the directory the project is generated in. This property can be set via command-line option '--project-name'.- Since:
- 5.0
-
getPackageName
The name of the package to use for generated source. This property can be set via command-line option '--package'.- Since:
- 5.0
-
getTestFramework
-
getProjectLayoutRegistry
public org.gradle.buildinit.plugins.internal.ProjectLayoutSetupRegistry getProjectLayoutRegistry() -
setupProjectLayout
public void setupProjectLayout() -
setType
-
getAvailableBuildTypes
-
setDsl
-
getAvailableDSLs
Available build script DSLs to be used.- Since:
- 4.5
-
setTestFramework
Set the test framework to be used. -
getAvailableTestFrameworks
-
setProjectName
-
setPackageName
-