java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.JavaExec
org.springframework.boot.gradle.tasks.run.BootRun
All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, BaseExecSpec, JavaExecSpec, JavaForkOptions, ProcessForkOptions, Configurable<Task>

@DisableCachingByDefault(because="Application should always run") public class BootRun extends JavaExec
Custom JavaExec task for running a Spring Boot application.
Since:
2.0.0
Author:
Andy Wilkinson
  • Constructor Details

    • BootRun

      public BootRun()
  • Method Details

    • isOptimizedLaunch

      @Input public boolean isOptimizedLaunch()
      Returns true if the JVM's launch should be optimized, otherwise false. Defaults to true.
      Returns:
      whether the JVM's launch should be optimized
      Since:
      2.2.0
    • setOptimizedLaunch

      public void setOptimizedLaunch(boolean optimizedLaunch)
      Sets whether the JVM's launch should be optimized. Defaults to true.
      Parameters:
      optimizedLaunch - true if the JVM's launch should be optimised, otherwise false
      Since:
      2.2.0
    • sourceResources

      public void sourceResources(SourceSet sourceSet)
      Adds the source directories of the given sourceSet's resources to the start of the classpath in place of the output's resources directory.
      Parameters:
      sourceSet - the source set
    • exec

      public void exec()
      Overrides:
      exec in class JavaExec