tadaskay / gradle-auto-jooq-plugin

Gradle plugin for automated jOOQ setup with PostgreSQL & Liquibase

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gradle-auto-jooq-plugin

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.

How it works

  1. Starts a DB container using docker
  2. Runs your DB migrations
  3. Runs jOOQ to generate Java classes from your effective DB schema
  4. Tears down DB container

Supported tools

  • Databases:
    • Postgresql
  • DB migrations:
    • Liquibase

Minimal configuration

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.

About

Gradle plugin for automated jOOQ setup with PostgreSQL & Liquibase

License:MIT License


Languages

Language:Kotlin 100.0%