Skip to content

Instantly share code, notes, and snippets.

@arashi01
Created February 22, 2013 11:48
Show Gist options
  • Save arashi01/5012924 to your computer and use it in GitHub Desktop.
Save arashi01/5012924 to your computer and use it in GitHub Desktop.
Lift project gradle build
apply plugin: 'scala'
apply plugin: 'war'
apply plugin: 'jetty'
def scalaVersion = '2.10.0'
def liftVersion = '2.5-M4'
repositories {
mavenCentral()
ivy {
url 'http://repo.zantekk.com/zantekk/ivy-release/'
}
ivy {
url 'http://repo.zantekk.com/zantekk/ivy-snapshot/'
}
mavenRepo name:'sonatype-snapshots', url:'https://oss.sonatype.org/content/repositories/snapshots/'
}
dependencies {
compile ("org.scala-lang:scala-library:$scalaVersion",
"net.liftweb:${scalaLibrary("lift-webkit", scalaVersion)}:$liftVersion",
"net.liftweb:${scalaLibrary("lift-db", scalaVersion)}:$liftVersion",
"net.liftmodules:${scalaLibrary("lift-jquery-module", scalaVersion)}:${moduleVersion("2.1", liftVersion)}",
"org.fusesource.scalate:${scalaLibrary("scalate-core", scalaVersion)}:1.6.1",
"org.fusesource.scalamd:${scalaLibrary("scalamd", scalaVersion)}:1.6")
testCompile "org.specs2:${scalaLibrary("specs2", scalaVersion)}:1.12.1"
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
providedRuntime 'ch.qos.logback:logback-classic:1.0.9'
}
tasks.withType(ScalaCompile) {
configure(scalaCompileOptions.forkOptions) {
memoryMaximumSize = '1g'
jvmArgs = ['-XX:MaxPermSize=512m']
}
scalaCompileOptions.useAnt = false
}
def moduleVersion(String version, String liftVersion) {
if (!version.contains("-SNAPSHOT") && !version.contains("-+") && liftVersion.contains("-SNAPSHOT")) {
"$liftVersion-$version-SNAPSHOT"
}
else "$liftVersion-$version"
}
def scalaLibrary(String library, String scalaVersion) {
if (scalaVersion.startsWith("2.10.")) "${library}_2.10" else "${library}_${scalaVersion}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment