https://github.com/vincenzopalazzo/gradle-database
The simple gradle plugin for the operations with database (create, drop, insert) with gradle
https://github.com/vincenzopalazzo/gradle-database
database database-management gradle gradle-create-database gradle-database gradle-drop-database gradle-java gradle-plugin sql
Last synced: 11 months ago
JSON representation
The simple gradle plugin for the operations with database (create, drop, insert) with gradle
- Host: GitHub
- URL: https://github.com/vincenzopalazzo/gradle-database
- Owner: vincenzopalazzo
- License: mit
- Created: 2019-05-08T22:47:44.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-17T19:55:46.000Z (over 6 years ago)
- Last Synced: 2025-02-02T16:34:36.667Z (about 1 year ago)
- Topics: database, database-management, gradle, gradle-create-database, gradle-database, gradle-drop-database, gradle-java, gradle-plugin, sql
- Language: Java
- Homepage:
- Size: 1.5 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://plugins.gradle.org/plugin/io.vincentpalazzo.gradledatabase)
- Import the dependence
```
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.gradleDatabase:database-gradle-plugins: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: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
- createDatabase
- createTable
- insertValue
- deleteDatabase
## Built With
* [sqltool](https://mvnrepository.com/artifact/org.hsqldb/sqltool/2.2.8) - The framework for some operation sql
* [gradle](https://gradle.org/) - Dependency Management
* [JDBC](https://www.oracle.com/technetwork/java/javase/jdbc/index.html) - The framework for some operation sql
* [jarexec.plugin](https://github.com/lingocoder/jarexec.plugin) - The plugin for find dependency into project main
## Authors
* **Vincent Palazzo** - *Initial work* - [Site](https://vincenzopalazzo.github.io/)
## License
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/vincenzopalazzo/gradle-database/blob/master/LICENSE) 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