private static void ensureConfigurationArtifactsResolved(@NotNull Configuration configuration) {
    // The following statement should trigger parallel resolution of configuration artifacts
    // All subsequent iterations are expected to use cached results.
    try {
      ArtifactView artifactView = configuration.getIncoming().artifactView(new Action<ArtifactView.ViewConfiguration>() {
        @Override
        public void execute(@NotNull ArtifactView.ViewConfiguration configuration) {
          configuration.setLenient(true);
        }
      });
      artifactView.getArtifacts().getArtifacts();
    }
    catch (Exception ignore) {
    }
  }
private static void ensureConfigurationArtifactsResolved(@NotNull Configuration configuration)