jOOQ generates Java code from your database and lets you build type safe SQL queries through its fluent API.
This plugin seamlessly integrates jOOQ into your Gradle-based project.
- Starts a DB container using docker
- Runs your DB migrations
- Runs jOOQ to generate Java classes from your effective DB schema
- Tears down DB container
- Databases:
- Postgresql
- DB migrations:
- Liquibase
plugins {
id 'java' // or id 'groovy'
id 'com.tadaskay.auto-jooq' version '1.0.1'
}
jooq {
main(sourceSets.main) {
generator {
target {
packageName = 'com.my.example.schema'
}
}
}
}
dependencies {
compile 'org.jooq:jooq:3.10.1'
jooqRuntime 'org.postgresql:postgresql:42.1.4'
}
For more jOOQ configuration options, refer to gradle-jooq-plugin, to which jOOQ generation task is delegated.