Class Properties


  • public final class Properties
    extends java.lang.Object
    Helpers for working with properties.
    Since:
    1.0.0
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T extends org.gradle.api.provider.HasConfigurableValue>
      T
      changesDisallowed​(T property)
      Touches property to finalize it.
      static <T extends org.gradle.api.provider.HasConfigurableValue>
      T
      finalized​(T property)
      Touches property to mark it as finalized.
      static <T extends org.gradle.api.provider.HasConfigurableValue>
      T
      finalizedOnRead​(T property)
      Touches property to mark it as finalized on read.
      static <T> @NotNull org.gradle.api.provider.Provider<T> forUseAtConfigurationTime​(@NotNull org.gradle.api.provider.Provider<T> provider)
      Mark a property as being for use at configuration time.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • forUseAtConfigurationTime

        @NotNull
        public static <T> @NotNull org.gradle.api.provider.Provider<T> forUseAtConfigurationTime​(@NotNull
                                                                                                 @NotNull org.gradle.api.provider.Provider<T> provider)
        Mark a property as being for use at configuration time.

        Gradle has deprecated this method, but it is required on older Gradle versions.

        Type Parameters:
        T - the provider value type
        Parameters:
        provider - provider to get for use at configuration time
        Returns:
        a configuration time-safe view of the provided provider
        Since:
        1.1.0
      • finalized

        @NotNull
        public static <T extends org.gradle.api.provider.HasConfigurableValue> T finalized​(@NotNull
                                                                                           T property)
        Touches property to mark it as finalized.
        Type Parameters:
        T - the type
        Parameters:
        property - the property
        Returns:
        the property
        Since:
        1.0.0
      • finalizedOnRead

        @NotNull
        public static <T extends org.gradle.api.provider.HasConfigurableValue> T finalizedOnRead​(@NotNull
                                                                                                 T property)
        Touches property to mark it as finalized on read.
        Type Parameters:
        T - the type
        Parameters:
        property - the property
        Returns:
        the property
        Since:
        1.0.0
      • changesDisallowed

        @NotNull
        public static <T extends org.gradle.api.provider.HasConfigurableValue> T changesDisallowed​(@NotNull
                                                                                                   T property)
        Touches property to finalize it.
        Type Parameters:
        T - the type
        Parameters:
        property - the property
        Returns:
        the property
        Since:
        1.0.0