Advertisement
andori

Untitled

Mar 5th, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. plugins {
  2. id 'nu.studer.jooq' version '2.0.6'
  3. }
  4.  
  5. apply plugin: 'java'
  6.  
  7. repositories {
  8. jcenter()
  9. }
  10.  
  11. jooq {
  12. version = '3.9.2' // the default (can be omitted)
  13. edition = 'OSS' // the default (can be omitted), other allowed values are PRO, PRO_JAVA_6, and TRIAL
  14. }
  15.  
  16. dependencies {
  17. compile 'org.jooq:jooq'
  18. // jooqRuntime 'org.postgresql:postgresql:42.1.1'
  19. jooqRuntime 'mysql:mysql-connector-java:6.0.6'
  20. }
  21.  
  22. jooq {
  23. version = '3.9.2'
  24. edition = 'OSS'
  25. FrxBackend(sourceSets.main) {
  26. jdbc {
  27. // driver = 'org.postgresql.Driver'
  28. // url = 'jdbc:postgresql://localhost:5432/test'
  29. // user = 'postgres'
  30. // password = '12345678'
  31. // properties {
  32. // property {
  33. // key = 'ssl'
  34. // value = 'true'
  35. // }
  36. // }
  37.  
  38. // driver = 'com.mysql.jdbc.Driver'
  39. driver = 'com.mysql.cj.jdbc.Driver'
  40. url = 'jdbc:mysql://172.30.155.176:3306/selog_dev?useSSL=false&useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC'
  41. user = 'root'
  42. password = 'P@ssw0rdAg1t'
  43. // properties {
  44. // property {
  45. // key = 'ssl'
  46. // value = 'true'
  47. // }
  48. // }
  49. }
  50. generator {
  51. name = 'org.jooq.util.DefaultGenerator'
  52. strategy {
  53. name = 'org.jooq.util.DefaultGeneratorStrategy'
  54. // ...
  55. }
  56. database {
  57. // name = 'org.jooq.util.postgres.PostgresDatabase'
  58. // schemata {
  59. // schema {
  60. // inputSchema = 'public'
  61. // }
  62. // schema {
  63. // inputSchema = 'membership'
  64. // }
  65. // }
  66. // forcedTypes {
  67. // forcedType {
  68. // userType = 'java.time.ZonedDateTime'
  69. // converter = 'com.agit.common.helpers.jooq.ZonedDateTimeConverter'
  70. // expression = '.*'
  71. // types = '.*TIMESTAMP.*'
  72. // }
  73. // }
  74. // ...
  75. name = 'org.jooq.util.mysql.MySQLDatabase'
  76. schemata {
  77. schema {
  78. inputSchema = 'selog_dev'
  79. }
  80. }
  81. // forcedTypes {
  82. // forcedType {
  83. // userType = 'java.time.ZonedDateTime'
  84. // converter = 'com.agit.movmi.common.helpers.jooq.ZonedDateTimeConverter'
  85. // expression = '.*'
  86. // types = '.*DATETIME.*'
  87. // }
  88. // }
  89. // ...
  90. }
  91. generate {
  92. relations = true
  93. deprecated = false
  94. records = true
  95. immutablePojos = false
  96. fluentSetters = true
  97. daos = true
  98. jpaAnnotations = true
  99. validationAnnotations = true
  100. // ...
  101. }
  102. target {
  103. packageName = 'com.agit.library.db'
  104. directory = 'library/src/main/java'
  105. }
  106. }
  107. }
  108. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement