|
6 | 6 | */
|
7 | 7 |
|
8 | 8 | package sbt
|
9 |
| -package internal |
10 |
| -package graph |
| 9 | +package plugins |
11 | 10 |
|
12 | 11 | import java.io.File
|
13 | 12 | import java.net.URI
|
| 13 | +import sbt.internal.graph._ |
14 | 14 | import sbt.BuildSyntax._
|
15 | 15 | import sbt.librarymanagement.{ ModuleID, UpdateReport }
|
16 | 16 |
|
17 |
| -trait DependencyGraphKeys { |
| 17 | +trait MiniDependencyTreeKeys { |
| 18 | + val dependencyTreeIncludeScalaLibrary = settingKey[Boolean]( |
| 19 | + "Specifies if scala dependency should be included in dependencyTree output" |
| 20 | + ) |
| 21 | + val dependencyTree = taskKey[Unit]("Prints an ascii tree of all the dependencies to the console") |
18 | 22 | val asString = taskKey[String]("Provides the string value for the task it is scoped for")
|
19 | 23 | // val printToConsole = TaskKey[Unit]("printToConsole", "Prints the tasks value to the console")
|
20 | 24 | val toFile = inputKey[File]("Writes the task value to the given file")
|
21 | 25 |
|
22 |
| - val dependencyTreeIncludeScalaLibrary = settingKey[Boolean]( |
23 |
| - "Specifies if scala dependency should be included in dependencyTree output" |
24 |
| - ) |
| 26 | + // internal |
| 27 | + private[sbt] val ignoreMissingUpdate = |
| 28 | + TaskKey[UpdateReport]("dependencyUpdate", "sbt-dependency-graph version of update") |
| 29 | + private[sbt] val moduleGraphStore = |
| 30 | + TaskKey[ModuleGraph]("module-graph-store", "The stored module-graph from the last run") |
| 31 | + val whatDependsOn = |
| 32 | + InputKey[String]("what-depends-on", "Shows information about what depends on the given module") |
| 33 | + private[sbt] val crossProjectId = SettingKey[ModuleID]("dependency-graph-cross-project-id") |
| 34 | +} |
25 | 35 |
|
| 36 | +object MiniDependencyTreeKeys extends MiniDependencyTreeKeys |
| 37 | + |
| 38 | +abstract class DependencyTreeKeys { |
26 | 39 | val dependencyGraphMLFile =
|
27 | 40 | settingKey[File]("The location the graphml file should be generated at")
|
28 | 41 | val dependencyGraphML =
|
@@ -59,37 +72,15 @@ trait DependencyGraphKeys {
|
59 | 72 | val dependencyBrowseTree = taskKey[URI](
|
60 | 73 | "Opens an HTML page that can be used to view the dependency tree"
|
61 | 74 | )
|
62 |
| - val moduleGraph = taskKey[ModuleGraph]("The dependency graph for a project") |
63 |
| - val moduleGraphIvyReport = taskKey[ModuleGraph]( |
64 |
| - "The dependency graph for a project as generated from an Ivy Report XML" |
65 |
| - ) |
66 |
| - val moduleGraphSbt = taskKey[ModuleGraph]( |
67 |
| - "The dependency graph for a project as generated from SBT data structures." |
68 |
| - ) |
69 |
| - val dependencyGraph = inputKey[Unit]("Prints the ascii graph to the console") |
70 |
| - val dependencyTree = taskKey[Unit]("Prints an ascii tree of all the dependencies to the console") |
| 75 | + val dependencyTreeModuleGraph = taskKey[ModuleGraph]("The dependency graph for a project") |
| 76 | + |
71 | 77 | val dependencyList =
|
72 | 78 | taskKey[Unit]("Prints a list of all dependencies to the console")
|
73 | 79 | val dependencyStats =
|
74 | 80 | taskKey[Unit]("Prints statistics for all dependencies to the console")
|
75 |
| - val ivyReportFunction = taskKey[String => File]( |
76 |
| - "A function which returns the file containing the ivy report from the ivy cache for a given configuration" |
77 |
| - ) |
78 |
| - val ivyReport = taskKey[File]( |
79 |
| - "A task which returns the location of the ivy report file for a given configuration (default `compile`)." |
80 |
| - ) |
81 | 81 | val dependencyLicenseInfo = taskKey[Unit](
|
82 | 82 | "Aggregates and shows information about the licenses of dependencies"
|
83 | 83 | )
|
84 |
| - |
85 |
| - // internal |
86 |
| - private[sbt] val ignoreMissingUpdate = |
87 |
| - TaskKey[UpdateReport]("dependencyUpdate", "sbt-dependency-graph version of update") |
88 |
| - private[sbt] val moduleGraphStore = |
89 |
| - TaskKey[ModuleGraph]("module-graph-store", "The stored module-graph from the last run") |
90 |
| - val whatDependsOn = |
91 |
| - InputKey[String]("what-depends-on", "Shows information about what depends on the given module") |
92 |
| - private[sbt] val crossProjectId = SettingKey[ModuleID]("dependency-graph-cross-project-id") |
93 | 84 | }
|
94 | 85 |
|
95 |
| -object DependencyGraphKeys extends DependencyGraphKeys |
| 86 | +object DependencyTreeKeys extends DependencyTreeKeys |
0 commit comments