title: sbt: How to get dependent jar files list by Scala code
body: <p>I'm new to sbt. I'd like to know how to get dependent jar files by Scala code, not executing sbt plugin.</p>
  
  <p>In Gradle, it supports to get dependent jar files by Java code like the following (<code>project</code> is an instance of <a href="https://docs.gradle.org/current/javadoc/org/gradle/api/Project.html" rel="nofollow noreferrer">Project</a> class):</p>
  
  <pre><code>Configuration config = project.getRootProject().getBuildscript().getConfigurations().detachedConfiguration();
  Set&lt;File&gt; jars = config.resolve();
  </code></pre>
  
  <p>I'd like to know a way to do like that in sbt and Scala. Does anyone know this? I tried to use <code>sbt.Project#dependencies</code>, but it seems that one doesn't meet for this purpose.</p>