Create a file named SCALA_PROJECT/build.gradle
with these contents:
group 'scala_gradle'
version '1.0-SNAPSHOT'
apply plugin: 'scala'
repositories {
jcenter()
mavenCentral()
maven {
url "https://repo.typesafe.com/typesafe/maven-releases"
}
}
dependencies {
compile group: 'org.scala-lang', name: 'scala-library', version: '2.10.6'
}
task "create-dirs" << {
sourceSets*.scala.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
}
Run gradle tasks
to see available tasks.
Run gradle create-dirs
to create a src/scala, src/resources
directory.
Run gradle build
to build the project and download dependencies.