Class ExpectedPropertiesExtension
This class represents a Gradle extension for handling expected properties in your project configuration. It allows the specification of property keys that are expected after including external property files.
It provides functionality for both:
- Managing the list of expected property keys
- Expanding properties into specified resource files
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for ExpectedPropertiesExtension. -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.ListProperty<String>
Returns the list of resource file paths where properties should be expanded.abstract org.gradle.api.provider.ListProperty<String>
Returns the list of expected property keys that are included after the external property files are processed.
-
Field Details
-
NAME
The name of this extension when it is added to a Gradle project. This name is used to access the extension from the Gradle project.
- See Also:
-
-
Constructor Details
-
ExpectedPropertiesExtension
public ExpectedPropertiesExtension()Default constructor for ExpectedPropertiesExtension. Initializes the expected properties list and the list of resource files to be expanded.
-
expected
: defaults to an empty list, indicating no specific keys are expected by default. -
expandToResources
: defaults to an empty list, meaning no properties will be expanded to resources by default.
This constructor sets the initial values using Gradle's convention mechanism.
-
-
-
Method Details
-
getExpected
Returns the list of expected property keys that are included after the external property files are processed. These keys represent the properties that are expected to be available after the inclusion process.
- Returns:
- a
ListProperty
ofString
objects representing the expected keys. This list will be empty by default if not specified.
-
getExpandToResources
Returns the list of resource file paths where properties should be expanded. These files will receive the expanded property values.
- Returns:
- a
ListProperty
ofString
objects representing the paths of resource files. These files will be populated with the expanded property values as needed.
-