groovy - How can I execute SQL file which contains several other SQL files using gradle? -
how can execute sql file contains several other sql files using gradle?
i tried using following code:
gradle.class.classloader.addurl(new file('sql/ojdbc6.jar').touri().tourl()) def sql = groovy.sql.sql.newinstance(jdbcurl, db_prop_schema, db_prop_password, 'oracle.jdbc.driver.oracledriver') string sqlfilepath = "testsql.sql" string sqlstring = new file(sqlfilepath).text sql.execute(sqlstring) sql.close()
Comments
Post a Comment