* @return a class path containing a corresponding 'scala-compiler' Jar and its dependencies
*/
public FileCollection inferScalaClasspath(final Iterable<File> classpath) {
// alternatively, we could return project.files(Runnable)
// would differ in the following ways: 1. live (not sure if we want live here) 2. no autowiring (probably want autowiring here)
return new LazilyInitializedFileCollection() {
@Override
public FileCollection createDelegate() {
if (project.getRepositories().isEmpty()) {
throw new GradleException(String.format("Cannot infer Scala class path because no repository is declared in %s", project));
}