Created
April 12, 2013 16:34
-
-
Save shellbj/5373324 to your computer and use it in GitHub Desktop.
Gradle build file for the class assignments for Functional Programming Principles in Scala on Coursera
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: "scala" | |
apply plugin: "eclipse" | |
apply plugin: "maven" | |
version = "1.0" | |
group = "org.coursera" | |
ext { | |
scalaVersion = "2.10.1" | |
} | |
repositories { | |
mavenCentral() | |
maven { url "https://oss.sonatype.org/content/repositories/releases" } | |
maven { url "http://namin.github.com/maven-repository/" } | |
maven { url "http://repo.spray.cc/" } | |
maven { url "https://raw.github.com/pniederw/expecty/master/m2repo/" } | |
} | |
configurations { | |
provided | |
style | |
} | |
dependencies { | |
scalaTools "org.scala-lang:scala-compiler:${scalaVersion}" | |
compile "org.scala-lang:scala-library:${scalaVersion}" | |
provided "org.scala-lang:scala-reflect:${scalaVersion}" | |
testCompile "junit:junit:4.11" | |
testCompile "org.scalatest:scalatest_2.10:1.9.1" | |
testCompile "org.expecty:expecty:0.9" | |
style "org.scalastyle:scalastyle-batch_2.9.2:0.2.0" | |
} | |
sourceSets.main.compileClasspath += configurations.provided | |
tasks.withType(ScalaCompile) { | |
scalaCompileOptions.useAnt = false | |
} | |
compileScala { | |
scalaCompileOptions.with { | |
additionalParameters = ["-deprecation", "-feature"] | |
} | |
} | |
uploadArchives { | |
repositories.mavenDeployer { | |
repository url: "file:///${projectDir}/m2repo" | |
} | |
} | |
test { | |
testLogging { | |
exceptionFormat "full" | |
showStackTraces = false | |
} | |
} | |
task style(type: JavaExec) { | |
classpath = configurations.style | |
main = 'org.scalastyle.Main' | |
args = ['--config', | |
relativePath('project/scalastyle_config.xml'), | |
relativePath('src/main/scala') | |
] | |
} | |
task wrapper(type: Wrapper) { | |
gradleVersion = "1.5" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment