Вы ищете dependencyClasspathAsJars
:
sbt > inspect dependencyClasspathAsJars
[info] Task: scala.collection.Seq[sbt.internal.util.Attributed[java.io.File]]
[info] Description:
[info] The classpath consisting of internal and external, managed and unmanaged dependencies, all as JARs.
[info] Provided by:
[info] ProjectRef(uri("file:/home/claudio/foo"), "foo") / Compile / dependencyClasspathAsJars
[info] Defined at:
[info] (sbt.Classpaths.classpaths) Defaults.scala:1800
[info] Dependencies:
...
Как видите, это задача, которая возвращает scala.collection.Seq[sbt.internal.util.Attributed[java.io.File]]
, где Attributed
- это простая оболочка для произвольных данных: https://www.scala-sbt.org/1.x/api/sbt/internal/util/Attributed.html
sbt > show dependencyClasspathAsJars
[info] List(Attributed(/home/claudio/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.13.1.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.play/twirl-api_2.13/jars/twirl-api_2.13-1.5.0.jar),
Attributed(/home/claudio/.ivy2/cache/org.scala-lang.modules/scala-xml_2.13/bundles/scala-xml_2.13-1.2.0.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.play/play-server_2.13/jars/play-server_2.13-2.8.1.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.play/play_2.13/jars/play_2.13-2.8.1.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.play/build-link/jars/build-link-2.8.1.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.play/play-exceptions/jars/play-exceptions-2.8.1.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.play/play-streams_2.13/jars/play-streams_2.13-2.8.1.jar),
Attributed(/home/claudio/.ivy2/cache/org.reactivestreams/reactive-streams/jars/reactive-streams-1.0.3.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.akka/akka-stream_2.13/jars/akka-stream_2.13-2.6.3.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe.akka/akka-actor_2.13/jars/akka-actor_2.13-2.6.3.jar),
Attributed(/home/claudio/.ivy2/cache/com.typesafe/config/bundles/config-1.4.0.jar)
...)
Если вы хотите обработать значение каким-либо образом, вы, вероятно, захотите написать пользовательское задание: https://www.scala-sbt.org/1.x/docs/Tasks.html