Class PropertiesTask
- java.lang.Object
-
- org.gradle.api.internal.AbstractTask
-
- org.gradle.api.DefaultTask
-
- org.springframework.boot.experimental.gradle.PropertiesTask
-
- All Implemented Interfaces:
java.lang.Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
public class PropertiesTask extends org.gradle.api.DefaultTaskTask to generate a thin.properties file including all runtime dependencies. It saves some time on startup to have the dependencies pre-computed, but it makes it less flexible, so this task is optional. If you enable it, you probably want to make it a dependency of the main java plugin task so that it runs automatically on build.- Author:
- Andy Wilkinson, Dave Syer
-
-
Constructor Summary
Constructors Constructor Description PropertiesTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerate()org.gradle.api.artifacts.ConfigurationgetConfiguration()java.lang.StringgetName()java.io.FilegetOutput()java.lang.StringgetProfile()protected java.util.PropertiesgetThinProperties(org.gradle.api.artifacts.Configuration configuration)voidsetConfiguration(org.gradle.api.artifacts.Configuration configuration)Sets theConfigurationthat will be used to resolve the dependencies that are listed inthin.properties.voidsetName(java.lang.String name)The name of the thin properties file (defaults to "thin").voidsetOutput(java.io.File output)Sets the location to which the properties file will be written.voidsetProfile(java.lang.String profile)The profile to use for the generated properties (default null)-
Methods inherited from class org.gradle.api.internal.AbstractTask
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProject, setProperty, setShouldRunAfter, shouldRunAfter, toString
-
-
-
-
Method Detail
-
generate
public void generate()
-
getThinProperties
protected java.util.Properties getThinProperties(org.gradle.api.artifacts.Configuration configuration)
-
setConfiguration
public void setConfiguration(org.gradle.api.artifacts.Configuration configuration)
Sets theConfigurationthat will be used to resolve the dependencies that are listed inthin.properties.- Parameters:
configuration- the configuration
-
getConfiguration
public org.gradle.api.artifacts.Configuration getConfiguration()
-
setOutput
public void setOutput(java.io.File output)
Sets the location to which the properties file will be written. Defaults to META-INF in the compiled classes output (build/resources/main/META-INF).- Parameters:
output- the output location
-
getOutput
public java.io.File getOutput()
-
setName
public void setName(java.lang.String name)
The name of the thin properties file (defaults to "thin").- Overrides:
setNamein classorg.gradle.api.internal.AbstractTask
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.gradle.api.Task- Overrides:
getNamein classorg.gradle.api.internal.AbstractTask
-
setProfile
public void setProfile(java.lang.String profile)
The profile to use for the generated properties (default null)- Parameters:
profile- the value of the profile
-
getProfile
public java.lang.String getProfile()
-
-