mirror of https://github.com/sbt/sbt.git
Get rid of InlineConfiguration
This commit is contained in:
parent
596354beae
commit
9e78b1cd9c
|
|
@ -32,7 +32,6 @@ private[sbt] object CompatibilityWarning {
|
|||
def processIntransitive(config: CompatibilityWarningOptions, module: IvySbt#Module, log: Logger): Unit = {
|
||||
val monitoredConfigsStr: Set[String] = (config.configurations map { _.name }).toSet
|
||||
val directDependencies: Seq[ModuleID] = module.moduleSettings match {
|
||||
case x: InlineConfiguration => x.dependencies
|
||||
case x: InlineConfigurationWithExcludes => x.dependencies
|
||||
case _ => Seq()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,7 +170,6 @@ final class IvySbt(val configuration: IvyConfiguration) {
|
|||
{
|
||||
val (baseModule, baseConfiguration) =
|
||||
moduleSettings match {
|
||||
case ic: InlineConfiguration => configureInline(ic.withExcludes, configuration.log)
|
||||
case ic: InlineConfigurationWithExcludes => configureInline(ic, configuration.log)
|
||||
case pc: PomConfiguration => configurePom(pc)
|
||||
case ifc: IvyFileConfiguration => configureIvyFile(ifc)
|
||||
|
|
@ -435,7 +434,6 @@ private[sbt] object IvySbt {
|
|||
{
|
||||
val sub = CrossVersion(scalaFullVersion, scalaBinaryVersion)
|
||||
m match {
|
||||
case ic: InlineConfiguration => ic.copy(module = sub(ic.module), dependencies = ic.dependencies map sub, overrides = ic.overrides map sub)
|
||||
case ic: InlineConfigurationWithExcludes => ic.copy(module = sub(ic.module), dependencies = ic.dependencies map sub, overrides = ic.overrides map sub)
|
||||
case _ => m
|
||||
}
|
||||
|
|
|
|||
|
|
@ -148,7 +148,6 @@ object IvyActions {
|
|||
}
|
||||
private def crossVersionMap(moduleSettings: ModuleSettings): Option[String => String] =
|
||||
moduleSettings match {
|
||||
case i: InlineConfiguration => CrossVersion(i.module, i.ivyScala)
|
||||
case i: InlineConfigurationWithExcludes => CrossVersion(i.module, i.ivyScala)
|
||||
case _ => None
|
||||
}
|
||||
|
|
|
|||
|
|
@ -115,29 +115,6 @@ final case class PomConfiguration(file: File, ivyScala: Option[IvyScala], valida
|
|||
def noScala = copy(ivyScala = None)
|
||||
}
|
||||
|
||||
// TODO: When we go sbt 1.0 we should rename InlineConfigurationWithExcludes to InlineConfiguration.
|
||||
@deprecated("Use InlineConfigurationWithExcludes.", "0.13.8")
|
||||
final case class InlineConfiguration(module: ModuleID, moduleInfo: ModuleInfo, dependencies: Seq[ModuleID], overrides: Set[ModuleID] = Set.empty, ivyXML: NodeSeq = NodeSeq.Empty, configurations: Seq[Configuration] = Nil, defaultConfiguration: Option[Configuration] = None, ivyScala: Option[IvyScala] = None, validate: Boolean = false, conflictManager: ConflictManager = ConflictManager.default) extends ModuleSettings {
|
||||
def withConfigurations(configurations: Seq[Configuration]) = copy(configurations = configurations)
|
||||
def noScala = copy(ivyScala = None)
|
||||
def withExcludes: InlineConfigurationWithExcludes =
|
||||
InlineConfigurationWithExcludes(this.module, this.moduleInfo, this.dependencies, this.overrides, Nil, this.ivyXML,
|
||||
this.configurations, this.defaultConfiguration, this.ivyScala, this.validate, this.conflictManager)
|
||||
def withOverrides(overrides: Set[ModuleID]): ModuleSettings =
|
||||
copy(overrides = overrides)
|
||||
}
|
||||
object InlineConfiguration {
|
||||
@deprecated("Use InlineConfigurationWithExcludes.explicitConfigurations.", "0.13.8")
|
||||
def configurations(explicitConfigurations: Iterable[Configuration], defaultConfiguration: Option[Configuration]) =
|
||||
if (explicitConfigurations.isEmpty) {
|
||||
defaultConfiguration match {
|
||||
case Some(Configurations.DefaultIvyConfiguration) => Configurations.Default :: Nil
|
||||
case Some(Configurations.DefaultMavenConfiguration) => Configurations.defaultMavenConfigurations
|
||||
case _ => Nil
|
||||
}
|
||||
} else
|
||||
explicitConfigurations
|
||||
}
|
||||
|
||||
final class InlineConfigurationWithExcludes private[sbt] (
|
||||
val module: ModuleID,
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import Configurations.Compile
|
|||
import ScalaArtifacts.{ LibraryID, CompilerID }
|
||||
import sbt.util.Logger
|
||||
import sbt.internal.util.ShowLines
|
||||
import sbt.internal.librarymanagement.{ IvySbt, InlineConfiguration, InlineConfigurationWithExcludes }
|
||||
import sbt.internal.librarymanagement.{ IvySbt, InlineConfigurationWithExcludes }
|
||||
|
||||
final class EvictionWarningOptions private[sbt] (
|
||||
val configurations: Seq[Configuration],
|
||||
|
|
@ -167,7 +167,6 @@ object EvictionWarning {
|
|||
|
||||
private[sbt] def processEvictions(module: IvySbt#Module, options: EvictionWarningOptions, reports: Seq[OrganizationArtifactReport]): EvictionWarning = {
|
||||
val directDependencies = module.moduleSettings match {
|
||||
case x: InlineConfiguration => x.dependencies
|
||||
case x: InlineConfigurationWithExcludes => x.dependencies
|
||||
case _ => Seq()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ trait BaseIvySpecification extends UnitSpec {
|
|||
)
|
||||
}
|
||||
|
||||
val moduleSetting: ModuleSettings = InlineConfiguration(
|
||||
val moduleSetting: ModuleSettings = InlineConfigurationWithExcludes(
|
||||
module = moduleId,
|
||||
moduleInfo = ModuleInfo("foo"),
|
||||
dependencies = deps,
|
||||
|
|
|
|||
Loading…
Reference in New Issue