@Override
  public @NotNull Collection<BuildTarget<?>> computeDependencies(@NotNull BuildTargetRegistry targetRegistry, @NotNull TargetOutputIndex outputIndex) {
    List<BuildTarget<?>> result = new ArrayList<>();

    ModuleBuildTarget compileTarget = new ModuleBuildTarget(myModule, JavaModuleBuildTargetType.getInstance(isTests()));
    result.add(compileTarget);
    for (BuildTarget<?> dep : compileTarget.computeDependencies(targetRegistry, outputIndex)) {
      if (dep instanceof ModuleBuildTarget) {
        result.add(new CheckResourcesTarget(((ModuleBuildTarget)dep).getModule(),
                                            ((ModuleBuildTarget)dep).isTests() ? TESTS : PRODUCTION));
      }
    }
    return result;
  }
@Override
  public @NotNull Collection<BuildTarget<?>> computeDependencies(@NotNull BuildTargetRegistry targetRegistry, @NotNull TargetOutputIndex outputIndex)