The simple gradle plugin for the operations with database (create, drop, insert) with gradle
The gradle-database is the simple plugin for gradle for operation with database.
The project is in versione 0.6 beta and this is reference on the site gradle
Import the dependence
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.gradleDatabase
0.6"
}
}
apply plugin: "io.vincentpalazzo.gradledatabase"
Configure the plugin with data of the Database
settingDatabase {
url = 'yourUrl'
username = 'yourUsername'
password = 'yourPassword'
nameDatabase = 'nameDb'
driver = 'package driver' //an example org.postgresql.Driver
nameJar = 'name dependence' //an example org.postgresql
42.2.5
pathFile = 'src/main/resources/db/schema.sql'
pathFileInsert = 'src/main/resources/db/insert.sql'
levelLog = 'info'
}
The loggin is into version alpha and exist level info, debug and error
but the print message for only level selected, an example the level debug print only
message debug and not message info, this is temporary
Now you can call this task
This project is licensed under the MIT License - see the LICENSE.md file for details
This plugin is testing only Postgress but if you test this plugin with another Database, I’m appy to recive a pull request with list
update