Class SpringBootPropertiesMigratorExtension
java.lang.Object
com.patbaumgartner.spring.migrator.gradle.SpringBootPropertiesMigratorExtension
Project-wide configuration for the analyze and migrate tasks.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns when the build should fail:never,manualwhen a finding needs a human, oranyfor any deprecated property at all.Returns the glob patterns, relative to the project directory, selecting the configuration files to inspect.Returns the optional file, relative to the project directory, to write the report to.Returns the Spring Boot version shown in the report.booleanisDryRun()Returns whether the migrate task should report without writing anything.voidsetDryRun(boolean dryRun) Sets whether the migrate task should report without writing anything.voidSets when the build should fail.voidsetIncludes(List<String> includes) Sets the glob patterns selecting the configuration files to inspect.voidsetReportFile(String reportFile) Sets the file to write the report to.voidsetSpringBootVersion(String springBootVersion) Sets the Spring Boot version shown in the report.
-
Constructor Details
-
SpringBootPropertiesMigratorExtension
public SpringBootPropertiesMigratorExtension()
-
-
Method Details
-
getIncludes
Returns the glob patterns, relative to the project directory, selecting the configuration files to inspect.- Returns:
- the include patterns
-
setIncludes
Sets the glob patterns selecting the configuration files to inspect.- Parameters:
includes- the include patterns
-
getFailOn
Returns when the build should fail:never,manualwhen a finding needs a human, oranyfor any deprecated property at all.- Returns:
- the failure policy name
-
setFailOn
Sets when the build should fail.- Parameters:
failOn- one ofnever,manualorany
-
getReportFile
Returns the optional file, relative to the project directory, to write the report to.- Returns:
- the report path, or
null
-
setReportFile
Sets the file to write the report to.- Parameters:
reportFile- a path relative to the project directory
-
getSpringBootVersion
Returns the Spring Boot version shown in the report. Metadata is always read from the resolved project classpath, so this does not change what gets detected.- Returns:
- the version override, or
null
-
setSpringBootVersion
Sets the Spring Boot version shown in the report.- Parameters:
springBootVersion- the version to display
-
isDryRun
public boolean isDryRun()Returns whether the migrate task should report without writing anything.- Returns:
- whether to run dry
-
setDryRun
public void setDryRun(boolean dryRun) Sets whether the migrate task should report without writing anything.- Parameters:
dryRun- whether to run dry
-