/gradle-smartsprites

Gradle Plug-in for SmartSprites

Primary LanguageGroovyApache License 2.0Apache-2.0

gradle-smartsprites

Gradle Plug-in for SmartSprites.

Usage

See: https://plugins.gradle.org/plugin/io.github.smartsprites

Specify at the beginning of your build.gradle:

plugins {
  id "io.github.smartsprites" version "1.1"
}

than configure it.

spriteConf {
    cssFileEncoding = "UTF-8"
    cssFileSuffix = "-v${version}"
    logLevel = "INFO"
    spritePngDepth = "AUTO"
    spritePngIe6 = "false"	
}

One can also specify the CSS file to process:

  • cssFiles = "${webAppDir}/css/my_style.css" in case of using the 'war' plug-in
  • or a list of files with source = fileTree(dir: "${webAppDir}", include: '**/*.css')

Than just call gradle sprites to generate the sprites.