in extractor/src/main/scala/org/jetbrains/sbt/extractors/DependenciesExtractor.scala [163:179]
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
}