Gradle Plugins

Maintained by aalmiray

Summary

Managing your CSS in a Gradle build is super easy now!

Website https://github.com/eriwen/gradle-css-plugin
Author eriwen
Version 1.8.1

Usage

buildscript {
    repositories { jcenter() }
    dependencies {
        classpath 'com.eriwen:gradle-css-plugin:1.8.1'
    }
}

apply plugin: 'css'

// Declare your sources
css.source {
    dev {
        css {
            srcDir "app/styles"
            include "*.css"
            exclude "*.min.css"
        }
    }
}

// Specify a collection of files to be combined, then minified and finally GZip compressed.
combineCss {
    source = css.source.dev.css.files
    dest = "${buildDir}/all.css"
}

minifyCss {
    source = combineCss
    dest = "${buildDir}/all-min.css"
    yuicompressor { // Optional
        lineBreakPos = -1
    }
}

gzipCss {
    source = minifyCss
    dest = "${buildDir}/all.2.0.4.css"
}