java.lang.Comparable<Task>
, org.gradle.api.internal.DynamicObjectAware
, org.gradle.api.internal.TaskInternal
, ExtensionAware
, Task
, Configurable<Task>
@DisableCachingByDefault(because="Not worth caching") public abstract class InitBuild extends DefaultTask
Task.Namer
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor | Description |
---|---|
InitBuild() |
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.
|
abstract Property<java.lang.Boolean> |
getComments() |
Should clarifying comments be added to files?
|
java.lang.String |
getDsl() |
The desired DSL of build scripts to create, defaults to 'kotlin'.
|
Property<InsecureProtocolOption> |
getInsecureProtocol() |
How to handle insecure (http) URLs used for Maven Repositories.
|
Property<java.lang.String> |
getJavaVersion() |
Java version to be used by generated Java projects.
|
protected abstract ProjectLayout |
getLayout() |
|
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.
|
protected abstract ProviderFactory |
getProviderFactory() |
|
Property<java.lang.Boolean> |
getSplitProject() |
Should the build be split into multiple subprojects?
This property can be set via the command-line options '--split-project'
and '--no-split-project'.
|
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, such as 'java-application' or 'kotlin-library'.
|
abstract Property<java.lang.Boolean> |
getUseDefaults() |
Should default values automatically be accepted for options that are not configured explicitly?
|
Property<java.lang.Boolean> |
getUseIncubating() |
Can the generated build use new and unstable features?
When enabled, the generated build will use new patterns, APIs or features that
may be unstable between minor releases.
|
protected abstract org.gradle.api.internal.tasks.userinput.UserInputHandler |
getUserInputHandler() |
|
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() |
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjects
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
@Incubating @Input @Optional public abstract Property<java.lang.Boolean> getUseDefaults()
When true, the interactive dialog is skipped, and no user input is required to complete the command.
This property can be set via the command-line options '--use-defaults' and '--no-use-defaults'.
@Input public java.lang.String getType()
This property can be set via command-line option '--type'.
Defaults to 'basic' - a minimal scaffolding, following Gradle best practices. If a `pom.xml` is found in the project root directory, the type defaults to 'pom' and the existing project is converted to Gradle.
Possible values for the option are provided by getAvailableBuildTypes()
.
@Input @Optional public Property<java.lang.Boolean> getSplitProject()
@Optional @Input public java.lang.String getDsl()
@Input @Optional public Property<java.lang.Boolean> getUseIncubating()
@Input @Optional @Incubating public Property<java.lang.String> getJavaVersion()
@Input public java.lang.String getProjectName()
@Input public java.lang.String getPackageName()
@Nullable @Optional @Input public java.lang.String getTestFramework()
@Input public Property<InsecureProtocolOption> getInsecureProtocol()
@Incubating @Input @Optional public abstract Property<java.lang.Boolean> getComments()
This property can be set via the command-line options '--comments' and '--no-comments'.
public org.gradle.buildinit.plugins.internal.ProjectLayoutSetupRegistry getProjectLayoutRegistry()
public void setupProjectLayout()
public void setType(java.lang.String type)
public java.util.List<java.lang.String> getAvailableBuildTypes()
public void setDsl(java.lang.String dsl)
public java.util.List<java.lang.String> getAvailableDSLs()
public void setTestFramework(@Nullable java.lang.String testFramework)
public java.util.List<java.lang.String> getAvailableTestFrameworks()
public void setProjectName(java.lang.String projectName)
public void setPackageName(java.lang.String packageName)
@Inject protected abstract ProviderFactory getProviderFactory()
@Inject protected abstract org.gradle.api.internal.tasks.userinput.UserInputHandler getUserInputHandler()
@Inject protected abstract ProjectLayout getLayout()