Is there any way to execute a sql script in gradle/groovy?


(Jeffrey Effendy) #1

Is there any way to execute a sql script in gradle/groovy?


(Peter Niederwieser) #2

You can use Groovy’s ‘Sql’ class, but loading the JDBC driver may require some class loader trickery due to a JDBC/Groovy incompatibility.


(uklance) #3

You could also use ant’s Sql task http://ant.apache.org/manual/Tasks/sql.html