mirror of https://github.com/sbt/sbt.git
Fix sbt 1.0 scripted test
This commit is contained in:
parent
e3097a56ca
commit
cfa72fed66
|
|
@ -7,25 +7,32 @@ lazy val updateSbtClassifiersCheck = TaskKey[Unit]("updateSbtClassifiersCheck")
|
||||||
|
|
||||||
updateSbtClassifiersCheck := {
|
updateSbtClassifiersCheck := {
|
||||||
|
|
||||||
val configReport = updateSbtClassifiers
|
val defaultModules = updateSbtClassifiers
|
||||||
.value
|
.value
|
||||||
.configuration(Default)
|
.configuration(Default)
|
||||||
.getOrElse {
|
.map(_.modules)
|
||||||
throw new Exception(
|
.getOrElse(Nil)
|
||||||
"default configuration not found in updateSbtClassifiers report"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
def artifacts(org: String, name: String) = configReport
|
val compileModules = updateSbtClassifiers
|
||||||
.modules
|
.value
|
||||||
.collect {
|
.configuration(Compile)
|
||||||
case moduleReport
|
.map(_.modules)
|
||||||
if moduleReport.module.organization == org &&
|
.getOrElse(Nil)
|
||||||
moduleReport.module.name == name =>
|
|
||||||
moduleReport.artifacts
|
def artifacts(org: String, name: String) =
|
||||||
}
|
(defaultModules ++ compileModules)
|
||||||
.toSeq
|
.map { m =>
|
||||||
.flatten
|
println(s"Found module $m")
|
||||||
|
m
|
||||||
|
}
|
||||||
|
.collect {
|
||||||
|
case moduleReport
|
||||||
|
if moduleReport.module.organization == org &&
|
||||||
|
moduleReport.module.name == name =>
|
||||||
|
moduleReport.artifacts
|
||||||
|
}
|
||||||
|
.toSeq
|
||||||
|
.flatten
|
||||||
|
|
||||||
def ensureHasArtifact(org: String, name: String) =
|
def ensureHasArtifact(org: String, name: String) =
|
||||||
assert(
|
assert(
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue