2017-04-02 21:51:11 +02:00
|
|
|
|
|
|
|
|
import sbt._
|
2017-06-06 19:51:38 +02:00
|
|
|
import sbt.Defaults.sbtPluginExtra
|
2017-04-02 21:51:11 +02:00
|
|
|
import sbt.Keys._
|
|
|
|
|
|
|
|
|
|
object Deps {
|
|
|
|
|
|
|
|
|
|
def quasiQuotes = "org.scalamacros" %% "quasiquotes" % "2.1.0"
|
2017-05-15 15:32:53 +02:00
|
|
|
def fastParse = "com.lihaoyi" %% "fastparse" % SharedVersions.fastParse
|
2017-10-20 02:48:12 +02:00
|
|
|
def jsoup = "org.jsoup" % "jsoup" % "1.10.3"
|
2017-04-02 21:51:11 +02:00
|
|
|
def scalaXml = "org.scala-lang.modules" %% "scala-xml" % "1.0.6"
|
|
|
|
|
def scalazConcurrent = "org.scalaz" %% "scalaz-concurrent" % SharedVersions.scalaz
|
|
|
|
|
def caseApp = "com.github.alexarchambault" %% "case-app" % "1.1.3"
|
|
|
|
|
def okhttpUrlConnection = "com.squareup.okhttp" % "okhttp-urlconnection" % "2.7.5"
|
2017-10-20 02:48:12 +02:00
|
|
|
def argonautShapeless = "com.github.alexarchambault" %% "argonaut-shapeless_6.2" % "1.2.0-M6"
|
Add json report to fetch and local exclusion option (#692)
This patch introduces changes for cli with json output #659. Format as follows:
```
{
"conflict_resolution": {
"org:name:version" (requested): "org:name:version" (reconciled)
},
"dependencies": [
{
"coord": "orgA:nameA:versionA",
"files": [
[
<classifier>,
<path>
]
],
"dependencies": [ // coodinates for its transitive dependencies
<orgX:nameX:versionX>,
<orgY:nameY:versionY>,
]
},
{
"coord": "orgB:nameB:versionB",
"files": [
[
<classifier>,
<path>
]
],
"dependencies": [ // coodinates for its transitive dependencies
<orgX:nameX:versionX>,
<orgZ:nameZ:versionZ>,
]
},
]
}
```
For example:
```
fetch -t org.apache.avro:trevni-avro:1.8.2 org.slf4j:slf4j-api:1.7.6 --json-output-file x.out
Result:
├─ org.apache.avro:trevni-avro:1.8.2
│ ├─ org.apache.avro:trevni-core:1.8.2
│ │ ├─ org.apache.commons:commons-compress:1.8.1
│ │ ├─ org.slf4j:slf4j-api:1.7.7
│ │ └─ org.xerial.snappy:snappy-java:1.1.1.3
│ └─ org.slf4j:slf4j-api:1.7.7
└─ org.slf4j:slf4j-api:1.7.6 -> 1.7.7
```
would produce the following json file:
```
$ jq < x.out
{
"conflict_resolution": {
"org.slf4j:slf4j-api:1.7.6": "org.slf4j:slf4j-api:1.7.7"
},
"dependencies": [
{
"coord": "org.apache.avro:trevni-core:1.8.2",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/avro/trevni-core/1.8.2/trevni-core-1.8.2.jar"
]
],
"dependencies": [
"org.slf4j:slf4j-api:1.7.7",
"org.xerial.snappy:snappy-java:1.1.1.3",
"org.apache.commons:commons-compress:1.8.1"
]
},
{
"coord": "org.apache.avro:trevni-avro:1.8.2",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/avro/trevni-avro/1.8.2/trevni-avro-1.8.2.jar"
]
],
"dependencies": [
"org.apache.avro:trevni-core:1.8.2",
"org.slf4j:slf4j-api:1.7.7",
"org.xerial.snappy:snappy-java:1.1.1.3",
"org.apache.commons:commons-compress:1.8.1"
]
},
{
"coord": "org.slf4j:slf4j-api:1.7.7",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.jar"
]
],
"dependencies": []
},
{
"coord": "org.apache.commons:commons-compress:1.8.1",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.jar"
]
],
"dependencies": []
},
{
"coord": "org.xerial.snappy:snappy-java:1.1.1.3",
"files": [
[
"",
"/Users/yic/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/xerial/snappy/snappy-java/1.1.1.3/snappy-java-1.1.1.3.jar"
]
],
"dependencies": []
}
]
}
```
2017-12-26 19:46:35 +01:00
|
|
|
def jackson = "com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.8.4"
|
|
|
|
|
def scalatest = "org.scalatest" %% "scalatest" % "3.0.0"
|
|
|
|
|
def junit = "junit" % "junit" % "4.12"
|
2017-04-02 21:51:11 +02:00
|
|
|
|
2017-06-06 19:51:38 +02:00
|
|
|
def sbtPgp = Def.setting {
|
2017-10-26 14:53:18 +02:00
|
|
|
val sbtv = CrossVersion.binarySbtVersion(sbtVersion.in(pluginCrossBuild).value)
|
2017-06-06 19:51:38 +02:00
|
|
|
val sv = scalaBinaryVersion.value
|
2017-10-20 02:48:12 +02:00
|
|
|
val ver = "1.1.0"
|
2017-06-06 19:51:38 +02:00
|
|
|
sbtPluginExtra("com.jsuereth" % "sbt-pgp" % ver, sbtv, sv)
|
|
|
|
|
}
|
|
|
|
|
|
2017-04-02 21:51:11 +02:00
|
|
|
def scalaAsync = Def.setting {
|
|
|
|
|
|
|
|
|
|
val version =
|
|
|
|
|
if (scalaBinaryVersion.value == "2.10") "0.9.5"
|
2017-10-20 02:48:12 +02:00
|
|
|
else "0.9.7"
|
2017-04-02 21:51:11 +02:00
|
|
|
|
|
|
|
|
"org.scala-lang.modules" %% "scala-async" % version
|
|
|
|
|
}
|
|
|
|
|
|
2017-07-11 19:04:00 +02:00
|
|
|
def jarjar = "io.get-coursier.jarjar" % "jarjar-core" % "1.0.1-coursier-1"
|
2017-04-02 21:51:11 +02:00
|
|
|
|
|
|
|
|
def jarjarTransitiveDeps = Seq(
|
|
|
|
|
"com.google.code.findbugs" % "jsr305" % "2.0.2",
|
2017-10-26 16:06:53 +02:00
|
|
|
"org.ow2.asm" % "asm-commons" % SharedVersions.asm,
|
|
|
|
|
"org.ow2.asm" % "asm-util" % SharedVersions.asm,
|
2017-05-15 15:32:49 +02:00
|
|
|
"org.slf4j" % "slf4j-api" % "1.7.25"
|
2017-04-02 21:51:11 +02:00
|
|
|
)
|
2017-07-11 19:40:50 +02:00
|
|
|
|
|
|
|
|
def scalaNativeNir = "io.get-coursier.scala-native" %% "nir" % SharedVersions.scalaNative
|
|
|
|
|
def scalaNativeTools = "io.get-coursier.scala-native" %% "tools" % SharedVersions.scalaNative
|
|
|
|
|
def scalaNativeUtil = "io.get-coursier.scala-native" %% "util" % SharedVersions.scalaNative
|
2017-05-15 15:32:49 +02:00
|
|
|
}
|