api / org.gradle.buildinit.tasks / InitBuild

InitBuild

open class InitBuild : DefaultTask

Generates a Gradle project structure.

Constructors

<init>

InitBuild()

Generates a Gradle project structure.

Functions

getAvailableBuildTypes

open fun getAvailableBuildTypes(): MutableList<String>

getAvailableDSLs

open fun getAvailableDSLs(): MutableList<String>

Available build script DSLs to be used.

getAvailableTestFrameworks

open fun getAvailableTestFrameworks(): MutableList<String>

getDsl

open fun getDsl(): String

The desired DSL of build scripts to create, defaults to 'groovy'. This property can be set via command-line option '--dsl'.

getProjectLayoutRegistry

open fun getProjectLayoutRegistry(): ProjectLayoutSetupRegistry

getTestFramework

open fun getTestFramework(): String

Alternative test framework to be used in the generated project. This property can be set via command-line option '--test-framework'

getType

open fun getType(): String

The desired type of build to create, defaults to 'pom' if 'pom.xml' is found in project root if no pom.xml is found, it defaults to 'basic'. This property can be set via command-line option '--type'.

setDsl

open fun setDsl(dsl: String): Unit

Set alternative build script DSL to be used.

setProjectLayoutRegistry

open fun setProjectLayoutRegistry(projectLayoutRegistry: ProjectLayoutSetupRegistry): Unit

setTestFramework

open fun setTestFramework(testFramework: String): Unit

setType

open fun setType(type: String): Unit

setupProjectLayout

open fun setupProjectLayout(): Unit