All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.didiglobal.booster.task.compression.pngquant.AbstractPngquantCompressImages.kt Maven / Gradle / Ivy

There is a newer version: 5.0.0-alpha3
Show newest version
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