Package org.gradle.buildinit.tasks

## Class InitBuild

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.buildinit.tasks.InitBuild

-     public class InitBuild
      extends DefaultTask

  Generates a Gradle project structure.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Task

      `Task.Namer`

  - ### Field Summary

    - ### Fields inherited from interface org.gradle.api.Task

      `TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `InitBuild​()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.util.List<java.lang.String>` | `getAvailableBuildTypes​()` |
    `java.util.List<java.lang.String>` | `getAvailableDSLs​()` | Available build script DSLs to be used.
    `java.util.List<java.lang.String>` | `getAvailableTestFrameworks​()` | Available test frameworks.
    `java.lang.String` | `getDsl​()` | The desired DSL of build scripts to create, defaults to 'groovy'.
    `java.lang.String` | `getPackageName​()` | The name of the package to use for generated source.
    `org.gradle.buildinit.plugins.internal.ProjectLayoutSetupRegistry` | `getProjectLayoutRegistry​()` |
    `java.lang.String` | `getProjectName​()` | The name of the generated project, defaults to the name of the directory the project is generated in.
    `java.lang.String` | `getTestFramework​()` | The test framework to be used in the generated project.
    `java.lang.String` | `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'.
    `void` | `setDsl​(java.lang.String dsl)` | Set the build script DSL to be used.
    `void` | `setPackageName​(java.lang.String packageName)` | Set the package name.
    `void` | `setProjectName​(java.lang.String projectName)` | Set the project name.
    `void` | `setTestFramework​(java.lang.String testFramework)` | Set the test framework to be used.
    `void` | `setType​(java.lang.String type)` |
    `void` | `setupProjectLayout​()` |

    - ### Methods 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`

    - ### Methods inherited from class org.gradle.api.DefaultTask

      `newInputDirectory, newInputFile, newOutputDirectory, newOutputFile`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### InitBuild

          public InitBuild​()

  - ### Method Detail

    - #### getType

          @Input
          public java.lang.String 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'. This property can be set via command-line option '--type'.

    - #### getDsl

          @Incubating
          @Optional
          @Input
          public java.lang.String 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

          @Incubating
          @Input
          public java.lang.String 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

          @Incubating
          @Input
          public java.lang.String 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

          @Nullable
          @Optional
          @Input
          public java.lang.String getTestFramework​()

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

    - #### getProjectLayoutRegistry

          public org.gradle.buildinit.plugins.internal.ProjectLayoutSetupRegistry getProjectLayoutRegistry​()

    - #### setupProjectLayout

          public void setupProjectLayout​()

    - #### setType

          public void setType​(java.lang.String type)

    - #### getAvailableBuildTypes

          public java.util.List<java.lang.String> getAvailableBuildTypes​()

    - #### setDsl

          @Incubating
          public void setDsl​(java.lang.String dsl)

      Set the build script DSL to be used.
      Since:
        4.5

    - #### getAvailableDSLs

          @Incubating
          public java.util.List<java.lang.String> getAvailableDSLs​()

      Available build script DSLs to be used.
      Since:
        4.5

    - #### setTestFramework

          public void setTestFramework​(@Nullable
                                       java.lang.String testFramework)

      Set the test framework to be used.

    - #### getAvailableTestFrameworks

          public java.util.List<java.lang.String> getAvailableTestFrameworks​()

      Available test frameworks.

    - #### setProjectName

          @Incubating
          public void setProjectName​(java.lang.String projectName)

      Set the project name.
      Since:
        5.0

    - #### setPackageName

          @Incubating
          public void setPackageName​(java.lang.String packageName)

      Set the package name.
      Since:
        5.0