Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plugins {
- id 'nu.studer.jooq' version '2.0.6'
- }
- apply plugin: 'java'
- repositories {
- jcenter()
- }
- jooq {
- version = '3.9.2' // the default (can be omitted)
- edition = 'OSS' // the default (can be omitted), other allowed values are PRO, PRO_JAVA_6, and TRIAL
- }
- dependencies {
- compile 'org.jooq:jooq'
- // jooqRuntime 'org.postgresql:postgresql:42.1.1'
- jooqRuntime 'mysql:mysql-connector-java:6.0.6'
- }
- jooq {
- version = '3.9.2'
- edition = 'OSS'
- FrxBackend(sourceSets.main) {
- jdbc {
- // driver = 'org.postgresql.Driver'
- // url = 'jdbc:postgresql://localhost:5432/test'
- // user = 'postgres'
- // password = '12345678'
- // properties {
- // property {
- // key = 'ssl'
- // value = 'true'
- // }
- // }
- // driver = 'com.mysql.jdbc.Driver'
- driver = 'com.mysql.cj.jdbc.Driver'
- url = 'jdbc:mysql://172.30.155.176:3306/selog_dev?useSSL=false&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC'
- user = 'root'
- password = 'P@ssw0rdAg1t'
- // properties {
- // property {
- // key = 'ssl'
- // value = 'true'
- // }
- // }
- }
- generator {
- name = 'org.jooq.util.DefaultGenerator'
- strategy {
- name = 'org.jooq.util.DefaultGeneratorStrategy'
- // ...
- }
- database {
- // name = 'org.jooq.util.postgres.PostgresDatabase'
- // schemata {
- // schema {
- // inputSchema = 'public'
- // }
- // schema {
- // inputSchema = 'membership'
- // }
- // }
- // forcedTypes {
- // forcedType {
- // userType = 'java.time.ZonedDateTime'
- // converter = 'com.agit.common.helpers.jooq.ZonedDateTimeConverter'
- // expression = '.*'
- // types = '.*TIMESTAMP.*'
- // }
- // }
- // ...
- name = 'org.jooq.util.mysql.MySQLDatabase'
- schemata {
- schema {
- inputSchema = 'selog_dev'
- }
- }
- // forcedTypes {
- // forcedType {
- // userType = 'java.time.ZonedDateTime'
- // converter = 'com.agit.movmi.common.helpers.jooq.ZonedDateTimeConverter'
- // expression = '.*'
- // types = '.*DATETIME.*'
- // }
- // }
- // ...
- }
- generate {
- relations = true
- deprecated = false
- records = true
- immutablePojos = false
- fluentSetters = true
- daos = true
- jpaAnnotations = true
- validationAnnotations = true
- // ...
- }
- target {
- packageName = 'com.agit.library.db'
- directory = 'library/src/main/java'
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement