Package org.gradle.util

## Class ConfigureUtil

- java.lang.Object
- - org.gradle.util.ConfigureUtil

-     @Deprecated
      public class ConfigureUtil
      extends Object

  Deprecated.
  Will be removed in Gradle 8.0.
  This class is only here to maintain binary compatibility with existing plugins.

  To apply a configuration (represented by a Groovy closure) on an object, use `Project.configure(Object, Closure)`.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `ConfigureUtil.IncompleteInputException` | Deprecated.
    `static class` | `ConfigureUtil.WrappedConfigureAction<T>` | Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ConfigureUtil()` | Deprecated.

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static <T> T` | `configure​(Closure configureClosure, T target)` | Deprecated. Configures `target` with `configureClosure`, via the `Configurable` interface if necessary.
    `static <T> T` | `configureByMap​(Map<?,​?> properties, T delegate)` | Deprecated.
    `static <T> T` | `configureByMap​(Map<?,​?> properties, T delegate, Collection<?> mandatoryKeys)` | Deprecated.
    `static <T> T` | `configureSelf​(Closure configureClosure, T target)` | Deprecated. Called from an object's `Configurable.configure(groovy.lang.Closure)` method.
    `static <T> T` | `configureSelf​(Closure configureClosure, T target, org.gradle.internal.metaobject.ConfigureDelegate closureDelegate)` | Deprecated. Called from an object's `Configurable.configure(groovy.lang.Closure)` method.
    `static <T> Action<T>` | `configureUsing​(Closure configureClosure)` | Deprecated. Creates an action that uses the given closure to configure objects of type T.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfigureUtil

          public ConfigureUtil()

      Deprecated.

  - ### Method Detail

    - #### configureByMap

          public static <T> T configureByMap​(Map<?,​?> properties,
                                             T delegate)

      Deprecated.

    - #### configureByMap

          public static <T> T configureByMap​(Map<?,​?> properties,
                                             T delegate,
                                             Collection<?> mandatoryKeys)

      Deprecated.

    - #### configure

          public static <T> T configure​(@Nullable
                                        Closure configureClosure,
                                        T target)

      Deprecated.

      Configures `target` with `configureClosure`, via the `Configurable` interface if necessary.

      If `target` does not implement `Configurable` interface, it is set as the delegate of a clone of `configureClosure` with a resolve strategy of `DELEGATE_FIRST`.

      If `target` does implement the `Configurable` interface, the `configureClosure` will be passed to `delegate`'s `Configurable.configure(Closure)` method.

      Parameters:
        `configureClosure` - The configuration closure
        `target` - The object to be configured
      Returns:
        The delegate param

    - #### configureUsing

          public static <T> Action<T> configureUsing​(@Nullable
                                                     Closure configureClosure)

      Deprecated.
      Creates an action that uses the given closure to configure objects of type T.

    - #### configureSelf

          public static <T> T configureSelf​(@Nullable
                                            Closure configureClosure,
                                            T target)

      Deprecated.
      Called from an object's `Configurable.configure(groovy.lang.Closure)` method.

    - #### configureSelf

          public static <T> T configureSelf​(@Nullable
                                            Closure configureClosure,
                                            T target,
                                            org.gradle.internal.metaobject.ConfigureDelegate closureDelegate)

      Deprecated.
      Called from an object's `Configurable.configure(groovy.lang.Closure)` method.