|
1 | 1 | buildscript { |
2 | | - ext.gradleVersion = '7.5.1' |
3 | | - ext.protobufPlugInVersion = '0.8.12' |
4 | | - ext.protobufVersion = '3.21.7' |
5 | | - ext.jerseyVersion = '3.1.0' |
6 | | - ext.junitVersion = '5.9.0' |
7 | | - ext.postgresVersion = '42.5.1' |
8 | | - ext.jooqVersion = '3.17.4' |
9 | | - ext.guiceVersion = '5.1.0' |
10 | | - dependencies { |
11 | | - classpath "org.postgresql:postgresql:$postgresVersion" |
12 | | - } |
13 | | - |
14 | | - configurations['classpath'].resolutionStrategy.eachDependency { |
15 | | - if (requested.group == 'org.jooq') { |
16 | | - useVersion '3.17.4' |
17 | | - } |
18 | | - } |
| 2 | + ext.gradleVersion = '7.5.1' |
| 3 | + ext.protobufPlugInVersion = '0.8.12' |
| 4 | + ext.protobufVersion = '3.21.7' |
| 5 | + ext.jerseyVersion = '3.1.0' |
| 6 | + ext.junitVersion = '5.9.0' |
| 7 | + ext.postgresVersion = '42.5.1' |
| 8 | + ext.jooqVersion = '3.17.7' |
| 9 | + ext.guiceVersion = '5.1.0' |
19 | 10 | } |
20 | 11 |
|
21 | 12 | plugins { |
22 | | - id 'java' |
23 | | - id 'com.google.protobuf' version "${protobufPlugInVersion}" |
24 | | - id 'war' |
25 | | - id 'idea' |
26 | | - id 'nu.studer.jooq' version '8.0' |
| 13 | + id 'java' |
| 14 | + id 'com.google.protobuf' version "${protobufPlugInVersion}" |
| 15 | + id 'war' |
| 16 | + id 'idea' |
| 17 | + id 'nu.studer.jooq' version '8.0' |
27 | 18 | } |
28 | 19 |
|
29 | 20 | repositories { |
30 | | - mavenCentral() |
| 21 | + mavenCentral() |
31 | 22 | } |
32 | 23 |
|
33 | 24 | idea { |
34 | | - module { |
35 | | - generatedSourceDirs.add(file("build/generated/proto/main")) |
36 | | - } |
| 25 | + module { |
| 26 | + generatedSourceDirs.add(file("build/generated/proto/main")) |
| 27 | + } |
37 | 28 | } |
38 | 29 |
|
39 | 30 | group 'org.vss' |
40 | 31 | version '1.0' |
41 | 32 |
|
42 | | - |
43 | 33 | dependencies { |
44 | | - implementation "com.google.protobuf:protobuf-java:$protobufVersion" |
| 34 | + implementation "com.google.protobuf:protobuf-java:$protobufVersion" |
45 | 35 |
|
46 | | - //jOOQ & Postgres impl deps |
47 | | - implementation "org.jooq:jooq:$jooqVersion" |
48 | | - implementation "org.jooq:jooq-meta:$jooqVersion" |
49 | | - implementation "org.jooq:jooq-codegen:$jooqVersion" |
50 | | - runtimeClasspath "org.postgresql:postgresql:$postgresVersion" |
51 | | - jooqGenerator "org.postgresql:postgresql:$postgresVersion" |
| 36 | + //jOOQ & Postgres impl deps |
| 37 | + implementation "org.jooq:jooq:$jooqVersion" |
| 38 | + implementation "org.jooq:jooq-meta:$jooqVersion" |
| 39 | + implementation "org.jooq:jooq-codegen:$jooqVersion" |
| 40 | + runtimeOnly "org.postgresql:postgresql:$postgresVersion" |
| 41 | + jooqGenerator "org.postgresql:postgresql:$postgresVersion" |
52 | 42 |
|
53 | | - implementation "com.google.inject:guice:$guiceVersion" |
| 43 | + implementation "com.google.inject:guice:$guiceVersion" |
54 | 44 |
|
55 | | - testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion" |
56 | | - testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion" |
| 45 | + testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion" |
| 46 | + testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junitVersion" |
57 | 47 | } |
58 | 48 |
|
59 | 49 | test { |
60 | | - useJUnitPlatform() |
| 50 | + useJUnitPlatform() |
61 | 51 | } |
62 | 52 |
|
63 | 53 | protobuf { |
64 | | - protoc { |
65 | | - artifact = "com.google.protobuf:protoc:$protobufVersion" |
66 | | - } |
| 54 | + protoc { |
| 55 | + artifact = "com.google.protobuf:protoc:$protobufVersion" |
| 56 | + } |
67 | 57 | } |
68 | 58 |
|
69 | 59 | jooq { |
70 | | - configurations { |
71 | | - main { |
72 | | - generateSchemaSourceOnCompilation = true |
| 60 | + configurations { |
| 61 | + main { |
| 62 | + generateSchemaSourceOnCompilation = true |
73 | 63 |
|
74 | | - generationTool { |
75 | | - jdbc { |
76 | | - driver = 'org.postgresql.Driver' |
77 | | - url = 'jdbc:postgresql://localhost:5432/postgres' |
78 | | - user = 'postgres' |
79 | | - password = '' |
80 | | - properties { |
81 | | - property { |
82 | | - key = 'ssl' |
83 | | - value = 'false' |
84 | | - } |
85 | | - } |
86 | | - } |
87 | | - generator { |
88 | | - name = 'org.jooq.codegen.DefaultGenerator' |
89 | | - database { |
90 | | - name = 'org.jooq.meta.postgres.PostgresDatabase' |
91 | | - inputSchema = 'public' |
92 | | - } |
93 | | - generate { |
94 | | - deprecated = false |
95 | | - records = true |
96 | | - immutablePojos = true |
97 | | - fluentSetters = true |
98 | | - } |
99 | | - target { |
100 | | - packageName = 'org.vss.postgres' |
101 | | - directory = 'build/generated-src/jooq/main' |
102 | | - } |
103 | | - strategy.name = 'org.jooq.codegen.DefaultGeneratorStrategy' |
104 | | - } |
| 64 | + generationTool { |
| 65 | + jdbc { |
| 66 | + driver = 'org.postgresql.Driver' |
| 67 | + url = 'jdbc:postgresql://localhost:5432/postgres' |
| 68 | + user = 'postgres' |
| 69 | + password = '' |
| 70 | + properties { |
| 71 | + property { |
| 72 | + key = 'ssl' |
| 73 | + value = 'false' |
105 | 74 | } |
| 75 | + } |
| 76 | + } |
| 77 | + generator { |
| 78 | + name = 'org.jooq.codegen.DefaultGenerator' |
| 79 | + database { |
| 80 | + name = 'org.jooq.meta.postgres.PostgresDatabase' |
| 81 | + inputSchema = 'public' |
| 82 | + } |
| 83 | + generate { |
| 84 | + deprecated = false |
| 85 | + records = true |
| 86 | + immutablePojos = true |
| 87 | + fluentSetters = true |
| 88 | + } |
| 89 | + target { |
| 90 | + packageName = 'org.vss.postgres' |
| 91 | + directory = 'build/generated-src/jooq/main' |
| 92 | + } |
| 93 | + strategy.name = 'org.jooq.codegen.DefaultGeneratorStrategy' |
106 | 94 | } |
| 95 | + } |
107 | 96 | } |
| 97 | + } |
108 | 98 | } |
0 commit comments