Class FlywayTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
net.ltgt.gradle.flyway.tasks.FlywayTask
- 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>
- Direct Known Subclasses:
FlywayClean, MigrationsFlywayTask
@UntrackedTask(because="Depends on the database")
public abstract class FlywayTask
extends org.gradle.api.DefaultTask
The base class for all Flyway tasks.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.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 -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.file.ConfigurableFileCollectionThe classpath for executing Flyway.Additional configuration properties to be merged with theconfiguration file(overriding it).abstract org.gradle.api.file.RegularFilePropertyThe Flyway configuration file (must be a Java properties file encoded in UTF-8, might not exist)abstract org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> Configures the java executable to be used to run Flyway.protected abstract org.gradle.api.file.ConfigurableFileCollectionThe directories containing migration scripts.abstract org.gradle.api.provider.Property<String> The password to use to connect to the database.protected abstract org.gradle.api.provider.Property<String> The target version up to which Flyway should consider migrations.abstract org.gradle.api.provider.Property<String> getUrl()The jdbc url to use to connect to the database.abstract org.gradle.api.provider.Property<String> getUser()The user to use to connect to the database.protected abstract org.gradle.workers.WorkerExecutorMethods 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, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjectsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Method Details
-
getWorkerExecutor
@Inject protected abstract org.gradle.workers.WorkerExecutor getWorkerExecutor() -
getClasspath
@Classpath public abstract org.gradle.api.file.ConfigurableFileCollection getClasspath()The classpath for executing Flyway.Defaults to the
flywayClasspathconfiguration, itself extending theflywayconfiguration. -
getUrl
-
getUser
-
getPassword
-
getConfigurationFile
@Internal public abstract org.gradle.api.file.RegularFileProperty getConfigurationFile()The Flyway configuration file (must be a Java properties file encoded in UTF-8, might not exist)Defaults to the project-level
flywayextension'sconfigurationFileproperty. -
getConfiguration
Additional configuration properties to be merged with theconfiguration file(overriding it).Defaults to the project-level
flywayextension'sconfigurationproperty. -
getMigrationLocations
@Internal protected abstract org.gradle.api.file.ConfigurableFileCollection getMigrationLocations()The directories containing migration scripts.Declared here as internal as an implementation detail to make it easier to implement the task action.
-
getTarget
The target version up to which Flyway should consider migrations.Declared here as internal as an implementation detail to make it easier to implement the task action.
-
getJavaLauncher
@Optional public abstract org.gradle.api.provider.Property<org.gradle.jvm.toolchain.JavaLauncher> getJavaLauncher()Configures the java executable to be used to run Flyway.If it is the same as the one used to run Gradle, then Flyway will run in-process.
When the
java-baseplugin is applied, it defaults to using the toolchainconfigured at the project level.
-