code: public FileCollection getClassesDirs(@Nonnull final SourceSet pSourceSet,
          @Nonnull final DependencyConfig pDepConfig)
      {
          FileCollection result = pSourceSet.getOutput().getClassesDirs();
          if (!pDepConfig.isDefaultConfig()) {
              JavaCompile compileTask = null;
              if (SourceSet.MAIN_SOURCE_SET_NAME.equals(pSourceSet.getName())) {
                  compileTask = (JavaCompile) buildUtil.getTask(TaskNames.compileJava, pDepConfig);
              }
              else if (BuildUtil.SONARQUBE_SOURCE_SET_NAME.equals(pSourceSet.getName())) {
                  compileTask = (JavaCompile) buildUtil.getTask(TaskNames.compileSonarqubeJava, pDepConfig);
              }
              else if (SourceSet.TEST_SOURCE_SET_NAME.equals(pSourceSet.getName())) {
                  compileTask = (JavaCompile) buildUtil.getTask(TaskNames.compileTestJava, pDepConfig);
              }
              else {
                  throw new GradleException("unknown source set: " + pSourceSet.getName());
              }
              result = project.files(compileTask.getDestinationDir());
          }
          return result;
      }
docs: Determine the directory where the dependency configuration specific compile tasks store their compiled classes.
  This can be just a single directory (the destination directory of teh Java compile task), or a file collection
  (the classes directories of the source set output).
  
  @param pSourceSet the source set
  @param pDepConfig the dependency configuration whose classes dir we are interested in
  @return the classes dir