Class ConfigurationCacheSupport


  • public class ConfigurationCacheSupport
    extends java.lang.Object
    Helper class to deal with Gradle configuration cache.
    • Constructor Detail

      • ConfigurationCacheSupport

        public ConfigurationCacheSupport()
    • Method Detail

      • serializableSupplierOf

        public static <T> java.util.function.Supplier<T> serializableSupplierOf​(ConfigurationCacheSupport.SerializableSupplier<T> supplier)
        Generates a serializable supplier lambda.
        Type Parameters:
        T - the type of the supplier
        Parameters:
        supplier - the supplier
        Returns:
        a serializable supplier
      • serializablePredicateOf

        public static <T> java.util.function.Predicate<T> serializablePredicateOf​(ConfigurationCacheSupport.SerializablePredicate<T> predicate)
        Generates a serializable predicate lambda.
        Type Parameters:
        T - the type of the predicate
        Parameters:
        predicate - the predicate
        Returns:
        a serializable predicate
      • serializableTransformerOf

        public static <OUT,​IN> org.gradle.api.Transformer<OUT,​IN> serializableTransformerOf​(ConfigurationCacheSupport.SerializableTransformer<OUT,​IN> transformer)
        Generates a serializable transformer lambda.
        Type Parameters:
        OUT - the output type of the transformer
        IN - the input type of the transformer
        Parameters:
        transformer - the transformer
        Returns:
        a serializable transformer
      • serializableFunctionOf

        public static <F,​T> java.util.function.Function<F,​T> serializableFunctionOf​(ConfigurationCacheSupport.SerializableFunction<F,​T> function)
        Generates a serializable function lambda.
        Type Parameters:
        F - the type of the parameter
        T - the type of the result
        Parameters:
        function - the bifunction
        Returns:
        a serializable function
      • serializableBiFunctionOf

        public static <T,​U,​R> java.util.function.BiFunction<T,​U,​R> serializableBiFunctionOf​(ConfigurationCacheSupport.SerializableBiFunction<T,​U,​R> bifunction)
        Generates a serializable bifunction lambda.
        Type Parameters:
        T - the type of the first parameter
        U - the type of the second parameter
        R - the type of the result
        Parameters:
        bifunction - the bifunction
        Returns:
        a serializable bifunction