SASS Gradle Plugin

Gradle plugin to build SASS/SCSS files

License

License

Categories

Categories

Gradle Build Tools
GroupId

GroupId

org.kravemir.gradle.sass
ArtifactId

ArtifactId

gradle-sass-plugin
Last Version

Last Version

1.2.4
Release Date

Release Date

Type

Type

jar
Description

Description

SASS Gradle Plugin
Gradle plugin to build SASS/SCSS files
Project URL

Project URL

https://github.com/kravemir/GradleSassPlugin/
Source Code Management

Source Code Management

http://github.com/kravemir/GradleSassPlugin/tree/master

Download gradle-sass-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/org.kravemir.gradle.sass/gradle-sass-plugin/ -->
<dependency>
    <groupId>org.kravemir.gradle.sass</groupId>
    <artifactId>gradle-sass-plugin</artifactId>
    <version>1.2.4</version>
</dependency>
// https://jarcasting.com/artifacts/org.kravemir.gradle.sass/gradle-sass-plugin/
implementation 'org.kravemir.gradle.sass:gradle-sass-plugin:1.2.4'
// https://jarcasting.com/artifacts/org.kravemir.gradle.sass/gradle-sass-plugin/
implementation ("org.kravemir.gradle.sass:gradle-sass-plugin:1.2.4")
'org.kravemir.gradle.sass:gradle-sass-plugin:jar:1.2.4'
<dependency org="org.kravemir.gradle.sass" name="gradle-sass-plugin" rev="1.2.4">
  <artifact name="gradle-sass-plugin" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.kravemir.gradle.sass', module='gradle-sass-plugin', version='1.2.4')
)
libraryDependencies += "org.kravemir.gradle.sass" % "gradle-sass-plugin" % "1.2.4"
[org.kravemir.gradle.sass/gradle-sass-plugin "1.2.4"]

Dependencies

compile (1)

Group / Artifact Type Version
com.vaadin : vaadin-sass-compiler jar 0.9.13

Project Modules

There are no modules declared in this project.

GradleSassPlugin

Build Status Codacy Badge

Plugin for SASS compilation. It uses vaadin-sass-compiler.

About

Main features (besides SASS compilation):

  • multiple build configurations support
  • preserve relative paths
  • various options, see
  • ... something missing? raise an issue for feature request :-) ...

Usage

Including in your project

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.org.kravemir.gradle.sass:GradleSassPlugin:1.2.2"
  }
}

apply plugin: "org.kravemir.gradle.sass"

Or with new the plugin mechanism:

plugins {
  id "org.kravemir.gradle.sass" version "1.2.2"
}

Simple configuration with extensions

sass {
    main {
        srcDir = file("$projectDir/src/main/sass")
        outDir = file("$buildDir/css")
    }
}

Using as task

You may declare new tasks directly using SassCompileTask class, without applying plugin, just make sure to have correctly set buildscript.

Configuration

Source and output configuration:

Name Description
srcDir (required) source directory containing sass files
outDir (required) output directory for generated resource/css files
outSubDir relative path for generated files within outDir, used together with registerInSourceSets
include pattern defining files to compile
exclude pattern defining excluded files from compilation (they can still be @import-ed)

Compilation properties:

Name Description
minify minifies compiled files within build configuration

Properties for integration with Java:

Name Description
registerInSourceSets list of sourceSet names to which outDir should be registered (affects classpath), see example build.gradle

License

All published versions are licensed under Apache 2.0. So, you're free to apply gradle plugin in commercial project.

You may also modify and redistribute the source, but with few limitations - see license.

Versions

Version
1.2.4