Hey, I'm trying to execute some Kotlin through a c...
# gradle
s
Hey, I'm trying to execute some Kotlin through a custom Gradle task. It tries to connect to a MySQL database but cannot find the necessary driver for the connection (
No suitable driver found for jdbc:mysql...
). I added
classpath("mysql:mysql-connector-java:5.1.24")
as a buildscript dependency but still, not working. Am I missing something?
n
Looks like you are trying to include the MySQL JDBC driver as a dependency. Try replacing classpath with compile (runtime) or testCompile (testing), and move the line into the dependencies block.
e
@s1m0nw1 it depends on a lot, please share a bit more about your setup, a reproducer would be great