Skip to content

Instantly share code, notes, and snippets.

@koizuss
Created October 24, 2013 19:09
Show Gist options
  • Save koizuss/7143173 to your computer and use it in GitHub Desktop.
Save koizuss/7143173 to your computer and use it in GitHub Desktop.
gradle+compass+livereloadx
buildscript {
repositories {
mavenCentral()
maven { url 'http://dl.bintray.com/robfletcher/gradle-plugins' }
}
dependencies {
classpath 'org.gradle.plugins:gradle-compass:1.0.7'
}
}
apply plugin: 'compass'
apply plugin: 'jetty'
/**
* Repositories
* @see http://www.gradle.org/docs/current/userguide/userguide_single.html#sec:repositories
*/
repositories {
mavenCentral()
}
compass {
cssDir = file("$webAppDir/style/css")
sassDir = file('src/main/sass')
debugInfo = false
environment = 'production'
noLineComments = false
}
task livereloadx {
description 'start livereload'
group 'Run background'
ext {
daemon = false
}
doLast {
def cmd = {
commandLine 'livereloadx', webAppDir
}
if(daemon) {
Thread.start { exec cmd }
return
}
exec cmd
}
}
jettyRun {
doFirst {
watchSass.execute()
livereloadx.daemon = true
livereloadx.execute()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment