Skip to content

Instantly share code, notes, and snippets.

@zsxwing
Created September 7, 2013 09:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zsxwing/6474220 to your computer and use it in GitHub Desktop.
Save zsxwing/6474220 to your computer and use it in GitHub Desktop.
A template of build.gradle for scala
apply plugin: 'scala'
apply plugin: 'eclipse'
sourceCompatibility = JavaVersion.VERSION_1_6
targetCompatibility = JavaVersion.VERSION_1_6
eclipse {
classpath {
downloadSources = true
downloadJavadoc = false
}
}
group = 'me.iamzsx'
archivesBaseName = 'TODO'
version = '1.0-SNAPSHOT'
description = 'TODO'
repositories {
mavenCentral()
maven {
url 'http://www2.ph.ed.ac.uk/maven2'
}
}
dependencies {
compile 'org.scala-lang:scala-library:2.10.1'
testCompile 'org.scala-lang:scala-library:2.10.1'
testCompile 'junit:junit:4.10'
testCompile 'org.scalatest:scalatest_2.10:1.9.1'
}
tasks.withType(ScalaCompile) {
scalaCompileOptions.useAnt = false
}
task someTask(type: JavaExec, dependsOn: build) {
main = 'me.iamzsx.MainClass'
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
jvmArgs "-Dactors.corePoolSize=6 -XX:+HeapDumpOnOutOfMemoryError"
maxHeapSize "1024m"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment