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

@DisableCachingByDefault(because="Not worth caching") public abstract class BuildInfo extends DefaultTask
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

    • getExcludes

      @Internal public abstract SetProperty<String> getExcludes()
      Returns the names of the properties to exclude from the output.
      Returns:
      names of the properties to exclude
      Since:
      3.0.0
    • generateBuildProperties

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

      @OutputDirectory public abstract DirectoryProperty getDestinationDir()
      Returns the directory to which the build-info.properties file will be written.
      Returns:
      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