mirror of https://github.com/sbt/sbt.git
Have Repository extend Product with Serializable
This commit is contained in:
parent
29e3cf8f81
commit
3ee3283a27
|
|
@ -8,7 +8,7 @@ import scalaz._
|
||||||
|
|
||||||
import coursier.core.compatibility.encodeURIComponent
|
import coursier.core.compatibility.encodeURIComponent
|
||||||
|
|
||||||
trait Repository {
|
trait Repository extends Product with Serializable {
|
||||||
def find[F[_]](
|
def find[F[_]](
|
||||||
module: Module,
|
module: Module,
|
||||||
version: String,
|
version: String,
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ object ResolutionTests extends TestSuite {
|
||||||
)
|
)
|
||||||
|
|
||||||
val projectsMap = projects.map(p => p.moduleVersion -> p.copy(configurations = MavenRepository.defaultConfigurations)).toMap
|
val projectsMap = projects.map(p => p.moduleVersion -> p.copy(configurations = MavenRepository.defaultConfigurations)).toMap
|
||||||
val testRepository = new TestRepository(projectsMap)
|
val testRepository = TestRepository(projectsMap)
|
||||||
|
|
||||||
val repositories = Seq[Repository](
|
val repositories = Seq[Repository](
|
||||||
testRepository
|
testRepository
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import coursier.core._
|
||||||
import scalaz.{ Monad, EitherT }
|
import scalaz.{ Monad, EitherT }
|
||||||
import scalaz.Scalaz._
|
import scalaz.Scalaz._
|
||||||
|
|
||||||
class TestRepository(projects: Map[(Module, String), Project]) extends Repository {
|
case class TestRepository(projects: Map[(Module, String), Project]) extends Repository {
|
||||||
val source = new core.Artifact.Source {
|
val source = new core.Artifact.Source {
|
||||||
def artifacts(
|
def artifacts(
|
||||||
dependency: Dependency,
|
dependency: Dependency,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue