mirror of https://github.com/sbt/sbt.git
parent
5a271fffc5
commit
6c2e62080c
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
import Compatibility._
|
||||
|
||||
lazy val noPomCheck = TaskKey[Unit]("noPomCheck")
|
||||
|
||||
noPomCheck := {
|
||||
|
|
@ -6,7 +8,7 @@ noPomCheck := {
|
|||
val log = streams.value.log
|
||||
|
||||
val configReport = update.value
|
||||
.configuration("compile")
|
||||
.configuration(Compile)
|
||||
.getOrElse {
|
||||
throw new Exception(
|
||||
"compile configuration not found in update report"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
object Compatibility {
|
||||
|
||||
implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal {
|
||||
def configuration(conf: sbt.Configuration) =
|
||||
rep.configuration(conf.name)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
object Compatibility
|
||||
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
import Compatibility._
|
||||
|
||||
val org = "io.get-coursier.scriptedtest"
|
||||
val ver = "0.1.0-SNAPSHOT"
|
||||
|
||||
|
|
@ -25,13 +27,13 @@ lazy val shared = Seq(
|
|||
val updateReport = update.value
|
||||
val updateClassifiersReport = updateClassifiers.value
|
||||
|
||||
def artifacts(config: String, classifier: Option[String], useClassifiersReport: Boolean = false) = {
|
||||
def artifacts(classifier: Option[String], useClassifiersReport: Boolean = false) = {
|
||||
|
||||
val configReport = (if (useClassifiersReport) updateClassifiersReport else updateReport)
|
||||
.configuration(config)
|
||||
.configuration(Compile)
|
||||
.getOrElse {
|
||||
throw new Exception(
|
||||
s"$config configuration not found in update report"
|
||||
"Compile configuration not found in update report"
|
||||
)
|
||||
}
|
||||
|
||||
|
|
@ -44,7 +46,7 @@ lazy val shared = Seq(
|
|||
}
|
||||
|
||||
log.info(
|
||||
s"Found ${artifacts.length} artifacts for config $config / classifier $classifier" +
|
||||
s"Found ${artifacts.length} artifacts for config Compile / classifier $classifier" +
|
||||
(if (useClassifiersReport) " in classifiers report" else "")
|
||||
)
|
||||
for (a <- artifacts)
|
||||
|
|
@ -53,11 +55,11 @@ lazy val shared = Seq(
|
|||
artifacts
|
||||
}
|
||||
|
||||
val compileSourceArtifacts = artifacts("compile", Some("sources"))
|
||||
val sourceArtifacts = artifacts("compile", Some("sources"), useClassifiersReport = true)
|
||||
val compileSourceArtifacts = artifacts(Some("sources"))
|
||||
val sourceArtifacts = artifacts(Some("sources"), useClassifiersReport = true)
|
||||
|
||||
val compileDocArtifacts = artifacts("compile", Some("javadoc"))
|
||||
val docArtifacts = artifacts("compile", Some("javadoc"), useClassifiersReport = true)
|
||||
val compileDocArtifacts = artifacts(Some("javadoc"))
|
||||
val docArtifacts = artifacts(Some("javadoc"), useClassifiersReport = true)
|
||||
|
||||
assert(
|
||||
compileSourceArtifacts.isEmpty,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
object Compatibility {
|
||||
|
||||
implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal {
|
||||
def configuration(conf: sbt.Configuration) =
|
||||
rep.configuration(conf.name)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
object Compatibility
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
|
||||
import Compatibility._
|
||||
|
||||
scalaVersion := appConfiguration.value.provider.scalaProvider.version
|
||||
|
||||
lazy val updateClassifiersCheck = TaskKey[Unit]("updateClassifiersCheck")
|
||||
|
|
@ -5,7 +8,7 @@ lazy val updateClassifiersCheck = TaskKey[Unit]("updateClassifiersCheck")
|
|||
updateClassifiersCheck := {
|
||||
|
||||
val configReport = updateClassifiers.value
|
||||
.configuration("compile")
|
||||
.configuration(Compile)
|
||||
.getOrElse {
|
||||
throw new Exception(
|
||||
"compile configuration not found in updateClassifiers report"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
object Compatibility {
|
||||
|
||||
implicit class UpdateReportOps(val rep: sbt.UpdateReport) extends AnyVal {
|
||||
def configuration(conf: sbt.Configuration) =
|
||||
rep.configuration(conf.name)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
object Compatibility
|
||||
Loading…
Reference in New Issue