private def mapProductionConfigurations()

in extractor-legacy-0.13/src/main/scala/org/jetbrains/sbt/extractors/DependenciesExtractor.scala [213:229]


  private def mapProductionConfigurations(configurations: Seq[Configuration]): Seq[Configuration] = {
    val prodConfigs = configurations.collect {
      // These conditions also apply to internal configurations. For example, when a compile-internal configuration
      // is used, only the compile configuration will be present, and it will be mapped to the provided scope.
      case config if config == Configuration.Compile => Configuration.Provided
      case config if config == Configuration.Runtime => Configuration.Runtime
    }

    val containsProvidedAndRuntime = Seq(Configuration.Provided, Configuration.Runtime).forall(prodConfigs.contains)
    val hasCustomSourceConfig = configurations.map(_.name).distinct.intersect(sourceConfigurationsNames).nonEmpty

    val needCompileScope = containsProvidedAndRuntime || (prodConfigs.isEmpty && hasCustomSourceConfig)
    if (needCompileScope)
      Seq(Configuration.Compile)
    else
      prodConfigs
  }