booster / com.didiglobal.booster.compression / CompressionTaskCreator / createCompressionTask

createCompressionTask

open fun createCompressionTask(variant: BaseVariant, results: CompressionResults, name: String, supplier: () -> Collection<File>, vararg deps: TaskProvider<out Task>): TaskProvider<out CompressImages<out CompressionOptions>>

Returns a task for compression

Parameters

variant - The build variant

results - The compression results for report generating

name - The name of task

supplier - The image supplier

deps - The dependent tasks

abstract fun createCompressionTask(variant: BaseVariant, results: CompressionResults, name: String, supplier: () -> Collection<File>, ignores: Set<Wildcard> = emptySet(), vararg deps: TaskProvider<out Task>): TaskProvider<out CompressImages<out CompressionOptions>>

Returns a task for compression

Parameters

variant - The build variant

results - The compression results for report generating

name - The name of task

supplier - The image supplier

ignores - wildcard of the resource name which to be excluded

deps - The dependent tasks