title: Gradle buildscript doesn't find Postgresql JDBC driver
body: <p>I'm trying to set up the database with a gradle task. But I'm not having any luck getting it to find the postgresql JDBC driver. In the java project, it finds the driver and runs fine (and it doesn't get dependencies through buildscript though), but not the gradle.build file.</p>
  
  <p>I tried using groovy.sql, and was greeted with the same error.</p>
  
  <pre><code>buildscript {
   repositories {
     mavenCentral()
   }
  
   dependencies {
    classpath 'org.postgresql:postgresql:42.2.0'
   }
  }
  
  import java.sql.*
  task testTask {
   ...
  </code></pre>
  
  <p>This line throws an error: 
   <strong>No suitable driver found for jdbc:postgresql://localhost:5432/db</strong></p>
  
  <pre><code> Connection conn = DriverManager.getConnection(db.url, db.user, db.password) 
   ...
  }
  </code></pre>