Interface ValueSourceParameters

All Known Implementing Classes:
ValueSourceParameters.None

public interface ValueSourceParameters
Marker interface for parameter objects to ValueSources.

Parameters are data holders for the inputs of a value source. Parameter types should be interfaces, only declaring getters for Property-like objects. They are configured in the ValueSourceSpec and isolated before the value is obtained.

Parameters must not inject services. An @Inject getter or constructor on a parameters type is deprecated and will fail with an error in Gradle 10. Compute values that need a service where the provider is created and pass them in as parameters.

public interface MyParameters extends ValueSourceParameters {
    Property<String> getStringParameter();
}
Since:
6.1
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
    Used for sources without parameters.