java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.springframework.boot.gradle.tasks.buildinfo.BuildInfo
All Implemented Interfaces:
Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, Configurable<Task>

@DisableCachingByDefault(because="Not worth caching") public class BuildInfo extends org.gradle.api.internal.ConventionTask
Task for generating a build-info.properties file from a Project.
Since:
2.0.0
Author:
Andy Wilkinson
  • Constructor Details

    • BuildInfo

      public BuildInfo()
  • Method Details

    • generateBuildProperties

      public void generateBuildProperties()
      Generates the build-info.properties file in the configured destination.
    • getDestinationDir

      @OutputDirectory public File getDestinationDir()
      Returns the directory to which the build-info.properties file will be written. Defaults to the Project's build directory.
      Returns:
      the destination directory
    • setDestinationDir

      public void setDestinationDir(File destinationDir)
      Sets the directory to which the build-info.properties file will be written.
      Parameters:
      destinationDir - the destination directory
    • getProperties

      public BuildInfoProperties getProperties()
      Returns the properties that will be included in the build-info.properties file.
      Returns:
      the properties
    • properties

      public void properties(Action<BuildInfoProperties> action)
      Executes the given action on the getProperties() properties.
      Parameters:
      action - the action