1. David Carr
  2. gradle-less-plugin


gradle-less-plugin /

Filename Size Date modified Message
106 B
94 B
402 B
9.9 KB
3.1 KB
1003 B
3.3 KB
5.0 KB
2.3 KB


The LESS plugin is a Gradle plugin for compiling LESS files into CSS files. It is available for use under the Apache License, Version 2.0. If you have any issues, please check the issue tracker, and if there isn't anything relevant, submit a new issue.

Build Status


The plugin is distributed via Bintray. If desired, you can use the Bintray plugin to simplify the configuration of Bintray repositories within Gradle build scripts.


To use the plugin, configure your build.gradle based the example below. See the CHANGES file for a listing of versions.

buildscript {
    repositories {
        maven {
            name = 'BintrayJCenter'
            url = 'http://jcenter.bintray.com'
    dependencies {
        classpath 'us.carrclan.david.gradle:gradle-less-plugin:VERSION'
apply plugin: 'less'

Site Plugin Integration

The LESS plugin integrates with the Site plugin to provide a useful default configuration if both are applied.

Project Layout

The LESS plugin assumes the project layout shown below when used with the Site plugin.

Directory Meaning
src/site/less Site LESS files


If the Site plugin is applied, the LESS plugin adds a task to your project, as shown below. Additionally, it adds a dependency on lessCompileSite to the publishSite task registered by the Site plugin.

Task name Depends on Type Description
lessCompileSite - LessCompile Compiles the site LESS files.

Task Defaults: lessCompileSite

Task Property Type Default Value
sourceDir Object "src/site/less"
destinationDir File "${site.sourceSet.output.resourceDir}/css"
encoding String None
compress Boolean None


The plugin introduces a new task type, LessCompile, which performs LESS compilation using lesscss-java.

Task Property Type Description
sourceDir Object The path to the LESS source files to compile.
destinationDir File The destination for the compiled CSS files.
encoding String The encoding with with to write the CSS files.
compress Boolean Whether to enable the LESS compiler's minification.