private @NotNull FileCollection getCompileClasspath(SourceSet sourceSet) {
    String compileTaskName = sourceSet.getCompileJavaTaskName();
    Task compileTask = myProject.getTasks().findByName(compileTaskName);
    if (compileTask instanceof AbstractCompile) {
      try {
        return ((AbstractCompile)compileTask).getClasspath();
      }
      catch (Exception e) {
        myContext.getMessageReporter().createMessage()
          .withGroup(Messages.DEPENDENCY_CLASSPATH_MODEL_GROUP)
          .withTitle("Compile classpath resolution error")
          .withText(String.format(
            "Error obtaining compile classpath for java compilation task for [%s] in project [%s]",
            sourceSet.getName(),
            myProject.getPath()
          ))
          .withException(e)
          .withKind(Message.Kind.WARNING)
          .reportMessage(myProject);
      }
    }
    return sourceSet.getCompileClasspath();
  }
private @NotNull FileCollection getCompileClasspath(SourceSet sourceSet)