mirror of https://github.com/sbt/sbt.git
Adjust dependency graph printing
This commit is contained in:
parent
bb45ca7f5d
commit
7c5b8479ea
|
|
@ -4,7 +4,6 @@ import coursier.core._
|
|||
import coursier.lmcoursier._
|
||||
import coursier.sbtcoursier.Keys._
|
||||
import coursier.sbtcoursiershared.SbtCoursierShared.autoImport._
|
||||
import coursier.util.Print.Colors
|
||||
import coursier.util.{Parse, Print}
|
||||
import sbt.Def
|
||||
import sbt.Keys._
|
||||
|
|
@ -112,7 +111,11 @@ object DisplayTasks {
|
|||
val resolutions = coursierResolutionTask(sbtClassifiers, ignoreArtifactErrors).value
|
||||
val result = new mutable.StringBuilder
|
||||
for (ResolutionResult(subGraphConfigs, resolution, _) <- resolutions) {
|
||||
val roots: Seq[Dependency] = resolution.transitiveDependencies.filter(f => f.module == module)
|
||||
val roots = resolution
|
||||
.minDependencies
|
||||
.filter(f => f.module == module)
|
||||
.toVector
|
||||
.sortBy(_.toString) // elements already have the same module, there's not much left for sorting…
|
||||
val strToPrint = s"$projectName (configurations ${subGraphConfigs.toVector.sorted.map(_.value).mkString(", ")})" + "\n" +
|
||||
Print.dependencyTree(
|
||||
resolution,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
scalaVersion := "2.11.8"
|
||||
|
||||
libraryDependencies += "org.apache.zookeeper" % "zookeeper" % "3.5.0-alpha"
|
||||
libraryDependencies += {
|
||||
sys.props("sbt.log.noformat") = "true" // disables colors in coursierWhatDependsOn output
|
||||
"org.apache.zookeeper" % "zookeeper" % "3.5.0-alpha"
|
||||
}
|
||||
|
||||
lazy val whatDependsOnCheck = TaskKey[Unit]("whatDependsOnCheck")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
dependency-graph (configurations compile, compile-internal, optional, provided, runtime, runtime-internal, test, test-internal)
|
||||
├─ log4j:log4j:1.2.16
|
||||
│ ├─ org.apache.zookeeper:zookeeper:3.5.0-alpha [33mlog4j:log4j:1.2.16 -> 1.2.17[0m
|
||||
│ └─ org.slf4j:slf4j-log4j12:1.7.5
|
||||
│ └─ org.apache.zookeeper:zookeeper:3.5.0-alpha
|
||||
└─ log4j:log4j:1.2.17
|
||||
├─ org.apache.zookeeper:zookeeper:3.5.0-alpha [33mlog4j:log4j:1.2.16 -> 1.2.17[0m
|
||||
├─ org.apache.zookeeper:zookeeper:3.5.0-alpha log4j:log4j:1.2.16 -> 1.2.17
|
||||
└─ org.slf4j:slf4j-log4j12:1.7.5
|
||||
└─ org.apache.zookeeper:zookeeper:3.5.0-alpha
|
||||
|
|
|
|||
Loading…
Reference in New Issue