mirror of https://github.com/sbt/sbt.git
Merge pull request #4713 from smarter/public-coursier
Make coursier-related tasks public
This commit is contained in:
commit
1426a6b48e
|
|
@ -327,16 +327,16 @@ object Keys {
|
||||||
val useCoursier = settingKey[Boolean]("Use Coursier for dependency resolution.").withRank(BSetting)
|
val useCoursier = settingKey[Boolean]("Use Coursier for dependency resolution.").withRank(BSetting)
|
||||||
val csrCacheDirectory = settingKey[File]("Coursier cache directory. Uses -Dsbt.coursier.home or Coursier's default.").withRank(CSetting)
|
val csrCacheDirectory = settingKey[File]("Coursier cache directory. Uses -Dsbt.coursier.home or Coursier's default.").withRank(CSetting)
|
||||||
val csrMavenProfiles = settingKey[Set[String]]("").withRank(CSetting)
|
val csrMavenProfiles = settingKey[Set[String]]("").withRank(CSetting)
|
||||||
private[sbt] val csrConfiguration = taskKey[CoursierConfiguration]("General dependency management (Coursier) settings, such as the resolvers and options to use.").withRank(DTask)
|
val csrConfiguration = taskKey[CoursierConfiguration]("General dependency management (Coursier) settings, such as the resolvers and options to use.").withRank(DTask)
|
||||||
private[sbt] val csrProject = taskKey[lmcoursier.definitions.Project]("")
|
val csrProject = taskKey[lmcoursier.definitions.Project]("")
|
||||||
private[sbt] val csrResolvers = taskKey[Seq[Resolver]]("")
|
val csrResolvers = taskKey[Seq[Resolver]]("")
|
||||||
private[sbt] val csrRecursiveResolvers = taskKey[Seq[Resolver]]("Resolvers of the current project, plus those of all from its inter-dependency projects")
|
val csrRecursiveResolvers = taskKey[Seq[Resolver]]("Resolvers of the current project, plus those of all from its inter-dependency projects")
|
||||||
private[sbt] val csrSbtResolvers = taskKey[Seq[Resolver]]("Resolvers used for sbt artifacts.")
|
val csrSbtResolvers = taskKey[Seq[Resolver]]("Resolvers used for sbt artifacts.")
|
||||||
private[sbt] val csrInterProjectDependencies = taskKey[Seq[lmcoursier.definitions.Project]]("Projects the current project depends on, possibly transitively")
|
val csrInterProjectDependencies = taskKey[Seq[lmcoursier.definitions.Project]]("Projects the current project depends on, possibly transitively")
|
||||||
private[sbt] val csrFallbackDependencies = taskKey[Seq[FallbackDependency]]("")
|
val csrFallbackDependencies = taskKey[Seq[FallbackDependency]]("")
|
||||||
private[sbt] val csrLogger = taskKey[Option[CacheLogger]]("")
|
val csrLogger = taskKey[Option[CacheLogger]]("")
|
||||||
private[sbt] val csrExtraCredentials = taskKey[Seq[lmcoursier.credentials.Credentials]]("")
|
val csrExtraCredentials = taskKey[Seq[lmcoursier.credentials.Credentials]]("")
|
||||||
private[sbt] val csrPublications = taskKey[Seq[(lmcoursier.definitions.Configuration, lmcoursier.definitions.Publication)]]("")
|
val csrPublications = taskKey[Seq[(lmcoursier.definitions.Configuration, lmcoursier.definitions.Publication)]]("")
|
||||||
|
|
||||||
val internalConfigurationMap = settingKey[Configuration => Configuration]("Maps configurations to the actual configuration used to define the classpath.").withRank(CSetting)
|
val internalConfigurationMap = settingKey[Configuration => Configuration]("Maps configurations to the actual configuration used to define the classpath.").withRank(CSetting)
|
||||||
val classpathConfiguration = taskKey[Configuration]("The configuration used to define the classpath.").withRank(CTask)
|
val classpathConfiguration = taskKey[Configuration]("The configuration used to define the classpath.").withRank(CTask)
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ import sbt.util.Logger
|
||||||
import sbt.io.syntax._
|
import sbt.io.syntax._
|
||||||
import xsbti.AppConfiguration
|
import xsbti.AppConfiguration
|
||||||
|
|
||||||
private[sbt] object LMCoursier {
|
object LMCoursier {
|
||||||
def defaultCacheLocation: File =
|
def defaultCacheLocation: File =
|
||||||
sys.props.get("sbt.coursier.home") match {
|
sys.props.get("sbt.coursier.home") match {
|
||||||
case Some(home) => new File(home).getAbsoluteFile / "cache"
|
case Some(home) => new File(home).getAbsoluteFile / "cache"
|
||||||
|
|
@ -181,7 +181,7 @@ private[sbt] object LMCoursier {
|
||||||
else Some(new CoursierLogger(st.log))
|
else Some(new CoursierLogger(st.log))
|
||||||
}
|
}
|
||||||
|
|
||||||
private[sbt] class CoursierLogger(logger: Logger) extends CacheLogger {
|
class CoursierLogger(logger: Logger) extends CacheLogger {
|
||||||
override def downloadedArtifact(url: String, success: Boolean): Unit =
|
override def downloadedArtifact(url: String, success: Boolean): Unit =
|
||||||
logger.debug(s"downloaded $url")
|
logger.debug(s"downloaded $url")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue