DriverManager doesn't see dependency in gradle custom plugin's task
问题 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: I have next build.gradle file: buildscript { repositories { mavenCentral() } dependencies { classpath("com.h2database:h2:1.4.196") } } plugins { id "someplugin" } apply plugin: 'groovy' And when I invoke command defined in task that extends DefaultTask DriverManager.getConnection("jdbc:h2:mem:", "sa", "") I receive exception No suitable driver found