All versions: 3.12 | Development versions: 3.13

Whitespace (newlines and indentation)

Available in ✅ Open Source Edition   ✅ Express Edition   ✅ Professional Edition   ✅ Enterprise Edition

By default, jOOQ's code generator produces unix newline characters (\n) and 4 space indentation (Java) or 2 space indentation (Scala). This can be overridden by using the following configuration flags:

XML configuration (standalone and Maven)

<configuration xmlns="">
      <indentation>  </indentation>

Programmatic configuration

  .withGenerator(new Generator(
    .withGenerate(new Generate()
      .withIndentation("  ")

Gradle configuration

myConfigurationName(sourceSets.main) {
  generator {
    generate {
      indentation = '  '
      newline = '\n'
The jOOQ Logo