Class SpringBootExtension

java.lang.Object
org.springframework.boot.gradle.dsl.SpringBootExtension

public class SpringBootExtension extends Object
Entry point to Spring Boot's Gradle DSL.
Since:
2.0.0
Author:
Andy Wilkinson, Scott Frederick
  • Constructor Summary

    Constructors
    Constructor
    Description
    SpringBootExtension(org.gradle.api.Project project)
    Creates a new SpringBootPluginExtension that is associated with the given project.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Creates a new BuildInfo task named bootBuildInfo and configures the Java plugin's classes task to depend upon it.
    void
    buildInfo(org.gradle.api.Action<BuildInfo> configurer)
    Creates a new BuildInfo task named bootBuildInfo and configures the Java plugin's classes task to depend upon it.
    org.gradle.api.provider.Property<String>
    Returns the fully-qualified name of the application's main class.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SpringBootExtension

      public SpringBootExtension(org.gradle.api.Project project)
      Creates a new SpringBootPluginExtension that is associated with the given project.
      Parameters:
      project - the project
  • Method Details

    • getMainClass

      public org.gradle.api.provider.Property<String> getMainClass()
      Returns the fully-qualified name of the application's main class.
      Returns:
      the fully-qualified name of the application's main class
      Since:
      2.4.0
    • buildInfo

      public void buildInfo()
      Creates a new BuildInfo task named bootBuildInfo and configures the Java plugin's classes task to depend upon it.

      By default, the task's destination dir will be a directory named META-INF beneath the main source set's resources output directory, and the task's project artifact will be the base name of the bootWar or bootJar task.

    • buildInfo

      public void buildInfo(org.gradle.api.Action<BuildInfo> configurer)
      Creates a new BuildInfo task named bootBuildInfo and configures the Java plugin's classes task to depend upon it. The task is passed to the given configurer for further configuration.

      By default, the task's destination dir will be a directory named META-INF beneath the main source set's resources output directory, and the task's project artifact will be the base name of the bootWar or bootJar task.

      Parameters:
      configurer - the task configurer