[build.gradle]
apply plugin: 'scala'
repositories{
mavenCentral()
mavenLocal()
}
dependencies{
compile "org.scala-lang:scala-library:2.11.7"
}
task run(type: JavaExec, dependsOn: classes) {
main = 'Main'
classpath sourceSets.main.runtimeClasspath
classpath configurations.runtime
}
[Main.scala]
object Main extends App {
println("Hello, world")
}
[Terminal]
gradle run