Package io.jooby.gradle
Class RunTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
io.jooby.gradle.BaseTask
io.jooby.gradle.RunTask
- 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>
Gradle plugin for Jooby run.
- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringRun task.static final StringRun task on test classpath.Fields inherited from class io.jooby.gradle.BaseTask
APP_CLASS_NAMEFields 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 -
Method Summary
Modifier and TypeMethodDescriptionList of file extensions that trigger a compilation request.Main class to run.Deprecated.getPort()Application port.List of file extensions that trigger an application restart.How long to wait after last file change to restart.Run app using a single classloader.voidrun()Run task.voidsetCompileExtensions(List<String> compileExtensions) Set compile extensions.voidsetMainClass(String mainClass) Set main class name.voidsetMainClassName(String mainClassName) Deprecated.voidSet application port.voidsetRestartExtensions(List<String> restartExtensions) Set restart extensions.voidsetUseSingleClassLoader(Boolean useSingleClassLoader) Run app using a single classloader.voidsetWaitTimeBeforeRestart(Long waitTimeBeforeRestart) Set How long to wait after last file change to restart.Methods inherited from class io.jooby.gradle.BaseTask
binDirectories, classes, classpath, computeMainClassName, createClassLoader, getJavaExtension, getProjects, jars, sourceDirectories, sourceSetMethods 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, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Field Details
-
RUN
Run task.- See Also:
-
TEST_RUN
Run task on test classpath.- See Also:
-
-
Constructor Details
-
RunTask
public RunTask()Creates a jooby run task.
-
-
Method Details
-
run
Run task.- Throws:
Throwable- If something goes wrong.
-
getMainClassName
Deprecated.Main class to run.- Returns:
- Main class (one with main method).
-
getMainClass
Main class to run.- Returns:
- Main class (one with main method).
-
setMainClassName
Deprecated.Set main class name.- Parameters:
mainClassName- Main class name.
-
setMainClass
Set main class name.- Parameters:
mainClass- Main class name.
-
getRestartExtensions
List of file extensions that trigger an application restart. Default is:conf,propertiesandclass.- Returns:
- Restart extensions.
-
setRestartExtensions
Set restart extensions. Extension is expected to be specify without.(dot).- Parameters:
restartExtensions- Restart extensions.
-
isUseSingleClassLoader
Run app using a single classloader. Default is:false.- Returns:
- Run app using a single classloader. Default is:
false.
-
setUseSingleClassLoader
Run app using a single classloader. Default is:false.- Parameters:
useSingleClassLoader- Run app using a single classloader. Default is:false.
-
getCompileExtensions
List of file extensions that trigger a compilation request. Compilation is done via Maven or Gradle. Default is:javaandkt.- Returns:
- Compile extensions.
-
setCompileExtensions
Set compile extensions. Extension is expected to be specify without.(dot).- Parameters:
compileExtensions- Compile extensions.
-
getPort
Application port.- Returns:
- Application port.
-
setPort
Set application port.- Parameters:
port- Application port.
-
getWaitTimeBeforeRestart
How long to wait after last file change to restart. Default is:500milliseconds.- Returns:
- How long to wait after last file change.
-
setWaitTimeBeforeRestart
Set How long to wait after last file change to restart. Default is:500milliseconds.- Parameters:
waitTimeBeforeRestart- How long to wait after last file change to restart.
-