The work on this software project is in no way associated with my employer nor with the role I'm having at my employer.
I maintain this project alone and as much or as little as my spare time permits using my personal equipment.
This Gradle plugin acts as a glue between (and exposes) two other great plugins available:
This plugin adds a small missing part between those two plugins: Testcontainers to create
a database during the Gradle build
stage:
- This allows running Flyway migration scripts against a real database instance.
- And limits the scope of jOOQ code generation to only those made by specific codebase.
plugins {
id 'io.github.suppierk.jooq-java-class-generator' version '1.0.1'
}
buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'io.github.suppierk:plugin:1.0.1'
}
}
apply plugin: 'io.github.suppierk.jooq-java-class-generator'
You can also check
example-project
in this repo
Because this plugin represents a glue between other plugins, please consult with their documentation first:
This plugin will simply set certain configurations for those plugins during Gradle build
stage.
The only configurable thing this plugin offers is to set a specific Docker image to be used by Testcontainers via:
jooqDockerImages {
// These are default values that can be overridden
postgres = 'postgres:16-alpine'
}
This configuration has been made to support jOOQ behavior when it comes to restricting code generation based on the database version or other dependencies within your project restricting your options, see the following comment
Arguably, this can also be automated based on jOOQ version support matrix, however I do not want to take away the ability to define your own Docker image.