项目作者: vincenzopalazzo

项目描述 :
The simple gradle plugin for the operations with database (create, drop, insert) with gradle
高级语言: Java
项目地址: git://github.com/vincenzopalazzo/gradle-database.git
创建时间: 2019-05-08T22:47:44Z
项目社区:https://github.com/vincenzopalazzo/gradle-database

开源协议:MIT License

下载


gradle-database

The gradle-database is the simple plugin for gradle for operation with database.

Getting Started

The project is in versione 0.6 beta and this is reference on the site gradle

  • Import the dependence

    1. buildscript {
    2. repositories {
    3. maven {
    4. url "https://plugins.gradle.org/m2/"
    5. }
    6. }
    7. dependencies {
    8. classpath "gradle.plugin.gradleDatabase:database-gradle-plugins:0.6"
    9. }
    10. }
    11. apply plugin: "io.vincentpalazzo.gradledatabase"
  • Configure the plugin with data of the Database

    1. settingDatabase {
    2. url = 'yourUrl'
    3. username = 'yourUsername'
    4. password = 'yourPassword'
    5. nameDatabase = 'nameDb'
    6. driver = 'package driver' //an example org.postgresql.Driver
    7. nameJar = 'name dependence' //an example org.postgresql:postgresql:42.2.5
    8. pathFile = 'src/main/resources/db/schema.sql'
    9. pathFileInsert = 'src/main/resources/db/insert.sql'
    10. levelLog = 'info'
    11. }

    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

    • createDatabase
    • createTable
    • insertValue
    • deleteDatabase

Built With

  • sqltool - The framework for some operation sql
  • gradle - Dependency Management
  • JDBC - The framework for some operation sql
  • jarexec.plugin - The plugin for find dependency into project main

Authors

  • Vincent Palazzo - Initial work - Site

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Appendix

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

DB Tested

  • Postgres