Class ExpectedPropertiesExtension

java.lang.Object
com.github.tmslpm.gradle.include.properties.ExpectedPropertiesExtension

public abstract class ExpectedPropertiesExtension extends Object

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
    Modifier and Type
    Field
    Description
    static final String
    The name of this extension when it is added to a Gradle project.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for ExpectedPropertiesExtension.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NAME

      public static final String 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

      public abstract org.gradle.api.provider.ListProperty<String> 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 of String objects representing the expected keys. This list will be empty by default if not specified.
    • getExpandToResources

      public abstract org.gradle.api.provider.ListProperty<String> getExpandToResources()

      Returns the list of resource file paths where properties should be expanded. These files will receive the expanded property values.

      Returns:
      a ListProperty of String objects representing the paths of resource files. These files will be populated with the expanded property values as needed.