title: DriverManager doesn't see dependency in gradle custom plugin's task
body: <p>I'm writing some gradle plugin and now I've faced with a problem that DriverManager doesn't see JDBC driver defined in buildscript dependency:</p>
  
  <p>I have next build.gradle file:</p>
  
  <pre><code>buildscript {
     repositories {
        mavenCentral()
     }
     dependencies {
        classpath("com.h2database:h2:1.4.196")
     }
  }
  plugins {
     id "someplugin"
  }
  apply plugin: 'groovy'
  </code></pre>
  
  <p>And when I invoke command defined in task that extends DefaultTask</p>
  
  <pre><code>DriverManager.getConnection("jdbc:h2:mem:", "sa", "")
  </code></pre>
  
  <p>I receive exception</p>
  
  <pre><code>No suitable driver found for jdbc:h2:mem:
  </code></pre>
  
  <p>There is no problem when I unit-test these classes - it happens only when I invoke plugin's task that invokes DriverManager.getConnection.</p>
  
  <p>What am I missing here? Thanks!</p>