Show Navigation


LESS Compiler for the Asset-Pipeline

Owner: bertramlabs | 2.14.8 | Feb 6, 2018 | Package | Issues | Source | License: Apache-2.0

dependencies {
    compile 'com.bertramlabs.plugins:less-asset-pipeline:2.14.8'


LESS Asset Pipeline

MOVED: This project has moved to a sub project of the main asset-pipeline repository

The less-asset-pipeline is a plugin that provides LESS support for the asset-pipeline static asset management plugin.

For more information on how to use asset-pipeline, visit here.


Add this plugin to your classpath in gradle or dependencies list depending on how you are using it:

//Example build.gradle file
buildscript {
    repositories {
    dependencies {
        classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.5.4'
        classpath 'com.bertramlabs.plugins:less-asset-pipeline:2.5.4'


Create files in your standard assets/stylesheets folder with extension .less or .css.less. You also may require other files by using the following requires syntax at the top of each file or the standard LESS import:

*= require test
*= require_self
*= require_tree .

/*Or use this*/
@import 'test'

Less4j Support

This plugin now defaults to compiling your less files with less4j instead of the standard less compiler. To Turn this off you must adjust your config:

assets {
    configOptions = [
      less: [
        compiler: 'standard'


During war build your less files are compiled into css files. This is all well and good but sometimes you dont want each individual less file compiled, but rather your main base less file. It may be best to add a sub folder for those LESS files and exclude it in your precompile config...

Sample Gradle Config:

  assets {
      excludes = ['mixins/*.less']