com.didiglobal.booster.task.compression.pngquant.AbstractPngquantCompressImages.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of booster-task-compression-pngquant Show documentation
Show all versions of booster-task-compression-pngquant Show documentation
booster-task-compression-pngquant
package com.didiglobal.booster.task.compression.pngquant
import com.didiglobal.booster.compression.task.CompressImages
import com.didiglobal.booster.gradle.getProperty
import org.gradle.api.tasks.TaskAction
/**
* Represents an abstraction of pngquant compression task
*
* @author johnsonlee
*/
abstract class AbstractPngquantCompressImages: CompressImages() {
@TaskAction
fun run() {
this.options = PngquantOptions(
project.getProperty(PROPERTY_OPTION_QUALITY, 80),
project.getProperty(PROPERTY_OPTION_SPEED, 3)
)
compress()
}
protected abstract fun compress()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy