This repository was archived by the owner on Apr 8, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
scala/net/virtualvoid/sbt/graph
scala-sbt-0.13/sbt/dependencygraph Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -11,5 +11,10 @@ object DependencyGraphSbtCompat {
11
11
def withMissingOk (missingOk : Boolean ): UpdateConfiguration =
12
12
updateConfig.copy(missingOk = missingOk)
13
13
}
14
+
15
+ implicit class RichInlineConfiguration (val i : InlineConfiguration ) extends AnyVal {
16
+ def withDependencies (newDependencies : Vector [ModuleID ]): InlineConfiguration =
17
+ i.copy(dependencies = newDependencies)
18
+ }
14
19
}
15
20
}
Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ trait DependencyGraphKeys {
95
95
val ivyReport = TaskKey [File ](
96
96
" ivy-report" ,
97
97
" A task which returns the location of the ivy report file for a given configuration (default `compile`)." )
98
- val ignoreMissingUpdate = Keys .update in ivyReport
99
98
val filterScalaLibrary = SettingKey [Boolean ](
100
99
" filter-scala-library" ,
101
100
" Specifies if scala dependency should be filtered in dependency-* output" )
@@ -104,6 +103,7 @@ trait DependencyGraphKeys {
104
103
" dependency-license-info" ,
105
104
" Aggregates and shows information about the licenses of dependencies" )
106
105
106
+ val ignoreMissingUpdate = TaskKey [UpdateReport ](" dependencyUpdate" , " Specialized update task for sbt-dependency-graph" )
107
107
// internal
108
108
private [graph] val moduleGraphStore = TaskKey [ModuleGraph ](" module-graph-store" , " The stored module-graph from the last run" )
109
109
val whatDependsOn = InputKey [String ](" what-depends-on" , " Shows information about what depends on the given module" )
Original file line number Diff line number Diff line change @@ -37,8 +37,18 @@ object DependencyGraphSettings {
37
37
38
38
def baseSettings = Seq (
39
39
ivyReportFunction := ivyReportFunctionTask.value,
40
- updateConfiguration in ignoreMissingUpdate := updateConfiguration.value.withMissingOk(true ),
41
40
41
+ // create our own version of `update` that will
42
+ // * not fail on missing artifacts
43
+ // * not actually download any jar files but only poms
44
+ updateConfiguration in ignoreMissingUpdate := updateConfiguration.value.withMissingOk(true ),
45
+ moduleSettings in ignoreMissingUpdate := {
46
+ moduleSettings.value match {
47
+ case i : InlineConfiguration ⇒ i.withDependencies(i.dependencies.map(_.pomOnly()).toVector)
48
+ case x ⇒ x
49
+ }
50
+ },
51
+ ivyModule in ignoreMissingUpdate := { val is = ivySbt.value; new is.Module ((moduleSettings in ignoreMissingUpdate).value) },
42
52
ignoreMissingUpdate :=
43
53
// inTask will make sure the new definition will pick up `updateConfiguration in ignoreMissingUpdate`
44
54
SbtAccess .inTask(ignoreMissingUpdate, Classpaths .updateTask).value,
You can’t perform that action at this time.
0 commit comments