I just tried to use zinc instead of ant but got the following exception (gradle 1.4, scala 2.10):
Executing org.gradle.api.internal.tasks.scala.jdk6.ZincScalaCompiler@329b0985 in compiler daemon.
Compiling with Zinc Scala compiler.
Exception executing org.gradle.api.internal.tasks.scala.jdk6.ZincScalaCompiler@329b0985 in compiler daemon: java.lang.NoSuchMethodError: scala.collection.JavaConverters$.asScalaBuf
ferConverter(Ljava/util/List;)Lscala/collection/JavaConverters$AsScala;.
:compileScala FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileScala'.
> scala.collection.JavaConverters$.asScalaBufferConverter(Ljava/util/List;)Lscala/collection/JavaConverters$AsScala;
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
I added the following snippet to my gradle file. Do I have to do something else? Is it a configuration problem?
You’ll have to set ‘scalaCompileOptions.fork=true’ to enable forking. Does this make a difference? Do you declare a Scala version other than 2.10.0 anywhere in the build? Do you override the defaults for ‘dependencies { zinc … }’? Can you provide a self-contained reproducible example?
I think the problem was that this also forced the Scala version for the ‘zinc’ configuration, and as such Zinc itself (which is written in Scala) ended up with the wrong Scala library version. Anyway, glad you found a solution.