Class StartTestResourcesService
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.micronaut.gradle.testresources.StartTestResourcesService
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>
,org.gradle.api.internal.DynamicObjectAware
,org.gradle.api.internal.TaskInternal
,org.gradle.api.Named
,org.gradle.api.plugins.ExtensionAware
,org.gradle.api.Task
,org.gradle.util.Configurable<org.gradle.api.Task>
public abstract class StartTestResourcesService
extends org.gradle.api.DefaultTask
A task responsible for starting a test resources server.
The test resources server can be started for a single
build, for a continuous build, or outlive a single build.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.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
-
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<String>
An access token which must be used by clients when talking to the test resources server.abstract org.gradle.api.file.DirectoryProperty
abstract org.gradle.api.file.ConfigurableFileCollection
The classpath of the test resources server.abstract org.gradle.api.provider.Property<Integer>
Client timeout, in seconds, to the server.abstract org.gradle.api.provider.Property<Boolean>
If set to true, the service will be started with debug enabled.protected abstract org.gradle.process.ExecOperations
abstract org.gradle.api.provider.Property<Integer>
An explicit port to use when starting the test resources server.abstract org.gradle.api.provider.Property<Boolean>
Allows starting the test server in foreground instead of background, in which case the build will block.protected abstract org.gradle.api.model.ObjectFactory
abstract org.gradle.api.file.RegularFileProperty
This file is used by the test server once started, to write the port where to contact it.abstract org.gradle.api.provider.Property<Integer>
Server idle timeout, in minutes.abstract org.gradle.api.file.DirectoryProperty
The directory where the settings to connect to the test resources server will be written.abstract org.gradle.api.provider.Property<Boolean>
An internal property used to determine if the server is in standalone mode, in which case it will outlive the build (it will stay in the background even if a build or a build session ends)abstract org.gradle.api.file.RegularFileProperty
An internal file used to determine if the server should be stopped at the end of a build or not.abstract org.gradle.api.provider.Property<Boolean>
void
Methods inherited from class 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, usesService
Methods inherited from class 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, setImpliesSubProjects
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Constructor Details
-
StartTestResourcesService
@Inject public StartTestResourcesService()
-
-
Method Details
-
getClasspath
@InputFiles @Classpath @Incremental public abstract org.gradle.api.file.ConfigurableFileCollection getClasspath()The classpath of the test resources server. Once the test server is started, the classpath cannot be updated.- Returns:
- the server classpath
-
getSettingsDirectory
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getSettingsDirectory()The directory where the settings to connect to the test resources server will be written. This directory is used by clients to determine how to contact the server.- Returns:
- the directory where to write settings
-
getPortFile
@Internal public abstract org.gradle.api.file.RegularFileProperty getPortFile()This file is used by the test server once started, to write the port where to contact it. It is used internally before we can write the settings.- Returns:
- the port file
-
getExplicitPort
An explicit port to use when starting the test resources server.- Returns:
- an explicit port
-
getAccessToken
An access token which must be used by clients when talking to the test resources server.- Returns:
- the access token
-
getClientTimeout
Client timeout, in seconds, to the server. This may have to be tweaked if spawning test resources take longer than the default, which is 60s.- Returns:
- the client timeout
-
getServerIdleTimeoutMinutes
@Input @Optional public abstract org.gradle.api.provider.Property<Integer> getServerIdleTimeoutMinutes()Server idle timeout, in minutes. If the server doesn't receive any request for this amount of time, it will stop itself.- Returns:
- the server idle timeout
-
getForeground
Allows starting the test server in foreground instead of background, in which case the build will block.- Returns:
- the foreground property
-
getStopFile
@Internal public abstract org.gradle.api.file.RegularFileProperty getStopFile()An internal file used to determine if the server should be stopped at the end of a build or not.- Returns:
- the stop file location
-
getDebugServer
If set to true, the service will be started with debug enabled.- Returns:
- the debug flag
-
getStandalone
An internal property used to determine if the server is in standalone mode, in which case it will outlive the build (it will stay in the background even if a build or a build session ends)- Returns:
- the standalone mode property
-
getUseClassDataSharing
-
getClassDataSharingDir
@Internal public abstract org.gradle.api.file.DirectoryProperty getClassDataSharingDir() -
getExecOperations
@Inject protected abstract org.gradle.process.ExecOperations getExecOperations() -
getObjects
@Inject protected abstract org.gradle.api.model.ObjectFactory getObjects() -
startService
- Throws:
IOException
-