PostgreSQL Embedded Server Gradle plugin
A plugin that adds the ability to start/stop Embedded PostgreSQL Server while executing Gradle tasks. After the server is started, environment variables are added to all dependent tasks of the JavaForkOptions type with the description of the running server.
apply plugin: https://plugins.gradle.org/plugin/ru.itbasis.gradle.plugins.postgresql-embedded-gradle-plugin
Environment & System environment
Java example, Spring properties example
default names |
---|
POSTGRES_HOST |
POSTGRES_PORT |
POSTGRES_DB_NAME |
POSTGRES_USER |
POSTGRES_PASSWORD |
POSTGRES_JDBC |
Extension properties
parameter | default value |
---|---|
version | PRODUCTION |
host | localhost |
port | 0 (find free port) |
dbName | postgres |
user | postgres |
password | postgres |
addParams | (empty list) |
runtimeConfig | view source code |
environmentNames | view source code |
Examples
- depends tasks and default PostgreSql server version: minimal
- custom PostgreSql server version: 9.5, 9.6
- custom environment: environment names, custom environment
- Spring Boot
TODO
- append multiple instance