mirror of https://github.com/sbt/sbt.git
rename to DependencyResolutionInterface
This commit is contained in:
parent
358b750dde
commit
0c28db9d21
|
|
@ -15,9 +15,9 @@ log: sbt.internal.util.ManagedLogger = sbt.internal.util.ManagedLogger@c439b0f
|
||||||
scala> val lm = {
|
scala> val lm = {
|
||||||
import sbt.librarymanagement.ivy._
|
import sbt.librarymanagement.ivy._
|
||||||
val ivyConfig = InlineIvyConfiguration().withLog(log)
|
val ivyConfig = InlineIvyConfiguration().withLog(log)
|
||||||
IvyLibraryManagement(ivyConfig)
|
IvyDependencyResolution(ivyConfig)
|
||||||
}
|
}
|
||||||
lm: sbt.librarymanagement.LibraryManagement = sbt.librarymanagement.ivy.IvyLibraryManagement@11c07acb
|
lm: sbt.librarymanagement.DependencyResolution = sbt.librarymanagement.DependencyResolution@6a9b40f8
|
||||||
|
|
||||||
scala> val module = "commons-io" % "commons-io" % "2.5"
|
scala> val module = "commons-io" % "commons-io" % "2.5"
|
||||||
module: sbt.librarymanagement.ModuleID = commons-io:commons-io:2.5
|
module: sbt.librarymanagement.ModuleID = commons-io:commons-io:2.5
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ import sbt.librarymanagement.syntax._
|
||||||
/**
|
/**
|
||||||
* Library management API to resolve dependencies.
|
* Library management API to resolve dependencies.
|
||||||
*/
|
*/
|
||||||
class LibraryManagement private[sbt] (lmEngine: LibraryManagementInterface) {
|
class DependencyResolution private[sbt] (lmEngine: DependencyResolutionInterface) {
|
||||||
import sbt.internal.librarymanagement.InternalDefaults._
|
import sbt.internal.librarymanagement.InternalDefaults._
|
||||||
import sbt.internal.librarymanagement.UpdateClassifiersUtil._
|
import sbt.internal.librarymanagement.UpdateClassifiersUtil._
|
||||||
|
|
||||||
|
|
@ -217,7 +217,7 @@ class LibraryManagement private[sbt] (lmEngine: LibraryManagementInterface) {
|
||||||
}).mkString(", ")
|
}).mkString(", ")
|
||||||
}
|
}
|
||||||
|
|
||||||
object LibraryManagement {
|
object DependencyResolution {
|
||||||
def apply(lmEngine: LibraryManagementInterface): LibraryManagement =
|
def apply(lmEngine: DependencyResolutionInterface): DependencyResolution =
|
||||||
new LibraryManagement(lmEngine)
|
new DependencyResolution(lmEngine)
|
||||||
}
|
}
|
||||||
|
|
@ -4,9 +4,9 @@ import java.io.File
|
||||||
import sbt.util.Logger
|
import sbt.util.Logger
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for library management intended for library management engine authors.
|
* Interface for dependency resolution intended for engine authors.
|
||||||
*/
|
*/
|
||||||
abstract class LibraryManagementInterface {
|
trait DependencyResolutionInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a ModuleDescriptor that describes a subproject with dependencies.
|
* Builds a ModuleDescriptor that describes a subproject with dependencies.
|
||||||
|
|
@ -35,7 +35,7 @@ abstract class LibraryManagementInterface {
|
||||||
/**
|
/**
|
||||||
* Interface for publishing modules.
|
* Interface for publishing modules.
|
||||||
*/
|
*/
|
||||||
abstract class PublisherInterface {
|
trait PublisherInterface {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Builds a ModuleDescriptor that describes a subproject with dependencies.
|
* Builds a ModuleDescriptor that describes a subproject with dependencies.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@ package ivy
|
||||||
import sbt.internal.librarymanagement._
|
import sbt.internal.librarymanagement._
|
||||||
import sbt.util.Logger
|
import sbt.util.Logger
|
||||||
|
|
||||||
class IvyLibraryManagement private[sbt] (val ivySbt: IvySbt) extends LibraryManagementInterface {
|
class IvyDependencyResolution private[sbt] (val ivySbt: IvySbt)
|
||||||
|
extends DependencyResolutionInterface {
|
||||||
type Module = ivySbt.Module
|
type Module = ivySbt.Module
|
||||||
|
|
||||||
override def moduleDescriptor(moduleSetting: ModuleDescriptorConfiguration): ModuleDescriptor = {
|
override def moduleDescriptor(moduleSetting: ModuleDescriptorConfiguration): ModuleDescriptor = {
|
||||||
|
|
@ -24,7 +25,7 @@ class IvyLibraryManagement private[sbt] (val ivySbt: IvySbt) extends LibraryMana
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object IvyLibraryManagement {
|
object IvyDependencyResolution {
|
||||||
def apply(ivyConfiguration: IvyConfiguration): LibraryManagement =
|
def apply(ivyConfiguration: IvyConfiguration): DependencyResolution =
|
||||||
LibraryManagement(new IvyLibraryManagement(new IvySbt(ivyConfiguration)))
|
DependencyResolution(new IvyDependencyResolution(new IvySbt(ivyConfiguration)))
|
||||||
}
|
}
|
||||||
|
|
@ -18,8 +18,8 @@ trait BaseIvySpecification extends UnitSpec {
|
||||||
ModuleID("com.example", "foo", "0.1.0").withConfigurations(Some("compile"))
|
ModuleID("com.example", "foo", "0.1.0").withConfigurations(Some("compile"))
|
||||||
|
|
||||||
lazy val log = ConsoleLogger()
|
lazy val log = ConsoleLogger()
|
||||||
def lmEngine(uo: UpdateOptions = UpdateOptions()): LibraryManagement =
|
def lmEngine(uo: UpdateOptions = UpdateOptions()): DependencyResolution =
|
||||||
IvyLibraryManagement(mkIvyConfiguration(uo))
|
IvyDependencyResolution(mkIvyConfiguration(uo))
|
||||||
|
|
||||||
def configurations = Vector(Compile, Test, Runtime)
|
def configurations = Vector(Compile, Test, Runtime)
|
||||||
def module(moduleId: ModuleID,
|
def module(moduleId: ModuleID,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue