jooq/jOOQ-codegen-gradle/example
Ben Manes 9f160d5e86 Contribute Gradle plugin
Contributing the [Gradle plugin](https://github.com/ben-manes/gradle-jooq-plugin) required,
 - Updating to the package names
 - Adding to the Maven build. The Gradle plugin dependencies piggyback
   on Flyway's repository, as Gradle does not officially publish the
   dependencies for building plugins in another build tool.
 - Assigning copyright

This contribution is not tested due to a broader build failure in
`FlashbackTable`.

Note that this plugin took a simple and fast approach by leveraging
Groovy's XML markeup syntax. This provided a concise extension, at
the cost of flexibility to customize the plugin in multiple build
scripts (e.g. subproject adding data type converters). A richer
plugin should be created, but exceeded the scope of what was needed
at the time of development.
2013-08-26 03:05:05 -07:00
..
gradle/wrapper Contribute Gradle plugin 2013-08-26 03:05:05 -07:00
src Contribute Gradle plugin 2013-08-26 03:05:05 -07:00
build.gradle Contribute Gradle plugin 2013-08-26 03:05:05 -07:00
gradlew Contribute Gradle plugin 2013-08-26 03:05:05 -07:00
gradlew.bat Contribute Gradle plugin 2013-08-26 03:05:05 -07:00
README.md Contribute Gradle plugin 2013-08-26 03:05:05 -07:00
settings.gradle Contribute Gradle plugin 2013-08-26 03:05:05 -07:00

This example shows how to combine jOOQ, Flyway database migrations, and the H2 embedded database to code generate during the build. This approach allows developers to avoid checking generated code into source control and supports Gradle's incremental building. The process optionally supports schema per project for service isolation. At application runtime a traditional database can be used, such as Postgres, using the generated jOOQ models. An alternative mapping library, ModelMapper, is used to demonstrate automatically projecting the record into a complex model.