Package org.gradle.buildinit.tasks
Klasse InitBuild
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.buildinit.tasks.InitBuild
- Alle implementierten Schnittstellen:
Comparable<Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,Named,ExtensionAware,Task,Configurable<Task>
@DisableCachingByDefault(because="Not worth caching")
public abstract class InitBuild
extends DefaultTask
Generates a Gradle project structure.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.gradle.api.Task
Task.Namer -
Feldübersicht
Von Schnittstelle geerbte Felder org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungShould we allow existing files in the build directory to be overwritten?Available build script DSLs to be used.Available test frameworks.protected abstract org.gradle.buildinit.specs.internal.BuildInitSpecRegistryShould clarifying comments be added to files?getDsl()The desired DSL of build scripts to create, defaults to 'kotlin'.How to handle insecure (http) URLs used for Maven Repositories.Java version to be used by generated Java projects.protected abstract ProjectLayoutprotected abstract ObjectFactoryThe 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.protected abstract ProviderFactoryShould the build be split into multiple subprojects?The test framework to be used in the generated project.getType()The desired type of project to generate, such as 'java-application' or 'kotlin-library'.Should default values automatically be accepted for options that are not configured explicitly?Can the generated build use new and unstable features?protected abstract org.gradle.api.internal.tasks.userinput.UserInputHandlervoidSet 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.voidvoidVon Klasse geerbte Methoden org.gradle.api.DefaultTask
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, usesServiceVon Klasse geerbte Methoden org.gradle.api.internal.AbstractTask
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, setImpliesSubProjectsVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Konstruktordetails
-
InitBuild
public InitBuild()
-
-
Methodendetails
-
getUseDefaults
Should default values automatically be accepted for options that are not configured explicitly?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'.
- Seit:
- 8.6
-
getAllowFileOverwrite
Should we allow existing files in the build directory to be overwritten? This property can be set via command-line option '--overwrite'. Defaults to false.- Seit:
- 8.9
-
getType
The desired type of project to generate, such as 'java-application' or 'kotlin-library'.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(). -
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'.- Seit:
- 6.7
-
getDsl
The desired DSL of build scripts to create, defaults to 'kotlin'. This property can be set via command-line option '--dsl'.- Seit:
- 4.5
-
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. Use this if you'd like to try out the latest features of Gradle. By default, init will generate a build that uses stable features and behavior.- Seit:
- 7.3
-
getJavaVersion
Java version to be used by generated Java projects. When set, Gradle will use the provided value as the target major Java version for all relevant generated projects. Gradle will validate the number to ensure it is a valid and supported major version.- Gibt zurück:
- the java version number supplied by the user
- Seit:
- 8.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'.- Seit:
- 5.0
-
getPackageName
The name of the package to use for generated source. This property can be set via command-line option '--package'.- Seit:
- 5.0
-
getTestFramework
The test framework to be used in the generated project. This property can be set via command-line option '--test-framework' -
getInsecureProtocol
How to handle insecure (http) URLs used for Maven Repositories. This property can be set via command-line option '--insecure-protocol'. The default value is 'warn'.- Seit:
- 7.3
-
getComments
Should clarifying comments be added to files?This property can be set via the command-line options '--comments' and '--no-comments'.
- Seit:
- 8.7
-
getProjectLayoutRegistry
public org.gradle.buildinit.plugins.internal.ProjectLayoutSetupRegistry getProjectLayoutRegistry() -
setupProjectLayout
public void setupProjectLayout() -
setType
-
getAvailableBuildTypes
-
setDsl
Set the build script DSL to be used.- Seit:
- 4.5
-
getAvailableDSLs
Available build script DSLs to be used.- Seit:
- 4.5
-
setTestFramework
Set the test framework to be used. -
getAvailableTestFrameworks
Available test frameworks. -
setProjectName
Set the project name.- Seit:
- 5.0
-
setPackageName
Set the package name.- Seit:
- 5.0
-
getProviderFactory
-
getUserInputHandler
@Inject protected abstract org.gradle.api.internal.tasks.userinput.UserInputHandler getUserInputHandler() -
getLayout
-
getObjectFactory
-
getBuildInitSpecRegistry
@Inject protected abstract org.gradle.buildinit.specs.internal.BuildInitSpecRegistry getBuildInitSpecRegistry()
-