Looks like you have a local Ivy repo whose artifact names don’t include the version. If you can’t change that, the Scala version cannot be inferred, and you’ll have to configure ‘scalaClasspath’ explicitly:
configurations {
scalaCompiler
}
dependencies {
scalaCompiler "org.scala-lang:scala-compiler:2.10.3"
// if you don't have a correct ivy.xml for scala-compiler,
// you'll also have to declare the two other deps
}
tasks.withType(ScalaCompile) {
scalaClasspath = configurations.scalaCompiler
}
This solution doesn’t rely on deprecated elements such as ‘scalaTools’, and hence also works for 2.x.