plugins {
// Apply the application plugin to add support for building a CLI application in Java.
id 'application'
// Build uber-jar
id 'com.github.johnrengelman.shadow' version '7.1.2' apply false
id "com.nocwriter.runsql" version "1.0.3"
}
task createEmptyDB(type: RunSQL) {
config {
username = ""
password = ""
url = "jdbc:sqlite:$projectDir/db_empty/sqlite/m2cm.db"
driverClassName = "org.sqlite.JDBC"
scriptFile = "/build/resources/main/db/sqlite/create-tables.sql"
}
}
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\dev\temp\m2cm\app\build.gradle' line: 164
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not find method arrayOf() for arguments [/build/resources/main/db/sqlite/create-tables.sql, /build/resources/main/db/sqlite/insert-data.sql] on RunSQLPrope
rties[url='jdbc:sqlite:C:\dev\temp\m2cm\app/db_empty/sqlite/m2cm.db', username='', password='', driverClassName='org.sqlite.JDBC', scriptFile='null'] of type com.n
ocwriter.runsql.gradle.RunSQLProperties.
* Try:
> Run with --stacktrace option to get the stack trace.
In build.gradle
Usage:
gradle createEmptyDB
As result it's success create sqlite's m2cm.db
Nice.
But I need to execute 2 sql scripts. I try this:
Usage:
gradle createEmptyDB
But get error