title: Gradle classpath, specify directory instead of individual jars
body: <p>I'm new to building projects with Gradle, and I'm hoping someone here can help me figure out a little problem I'm having specifying an external jar dependency.</p>
  
  <p>Right now, the only way I can get my Gradle-built jar to run is by specifying the dependency in my build.gradle file (here the Postgres JDBC driver) explicitly, like so:</p>
  
  <pre><code>jar {
      manifest {
          attributes (
                  "Main-Class": "&lt;redacted&gt;",
                  "Class-Path": "/lib/java/postgresql-9.4.1209.jar"
          )
      }
  }
  </code></pre>
  
  <p>As you can see, I have to specify exactly which jar I'm using. This is fine when I only have a few external deps, but I'm worried I'll have a massive classpath specification once I've got four or five external deps.</p>
  
  <p>Is there a way to simply specify a folder it should look in instead of naming each jar? I want so be able to do something like this:</p>
  
  <p><code>"Class-Path": "/lib/java/*"</code></p>
  
  <p>Is this possible?</p>
  
  <p>Thanks!</p>