-
Notifications
You must be signed in to change notification settings - Fork 56
/
build.gradle
71 lines (62 loc) · 2.78 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
apply plugin: 'nu.studer.jooq'
ext.moduleName = 'stroom.analytics.impl.db.jooq'
dependencies {
implementation libs.jakarta_annotation_api
implementation libs.jooq
runtimeOnly libs.mysql_connector_java
jooqGenerator libs.mysql_connector_java
}
// Configure jooq plugin to generate code
jooq {
version = versions.jooq
edition = nu.studer.gradle.jooq.JooqEdition.OSS // default (can be omitted)
configurations {
main { // name of the jOOQ configuration
// Disable JOOQ code generation on build
generateSchemaSourceOnCompilation = false
generationTool {
logging = org.jooq.meta.jaxb.Logging.WARN
jdbc {
driver = 'com.mysql.cj.jdbc.Driver'
url = 'jdbc:mysql://localhost:3307/stroom?useUnicode=yes&characterEncoding=UTF-8'
user = 'stroomuser'
password = 'stroompassword1'
}
generator {
name = 'org.jooq.codegen.JavaGenerator'
database {
name = 'org.jooq.meta.mysql.MySQLDatabase'
inputSchema = 'stroom'
// Add anything you want included in generation below, whitespace ignored
// and comments allowed. Each one is a java regex
includes = "" +
"analytic_tracker|" +
"execution_schedule|" +
"execution_history|" +
"execution_tracker"
// We don't want to include flyway versioning
excludes = 'analytic_schema_history'
// Specify 'version' for use in optimistic concurrency control
recordVersionFields = 'version'
// analytics_task.status is non-boolean tinyint
// Treat some tinyint columns as booleans
forcedTypes {
forcedType {
name = 'BOOLEAN'
includeExpression = '' +
'.*\\.execution_schedule\\.enabled|' +
'.*\\.execution_schedule\\.contiguous'
// see https://github.com/jOOQ/jOOQ/issues/9405
includeTypes = '(?i:tinyint)(\\(1\\))?'
}
}
}
target {
packageName = 'stroom.analytics.impl.db.jooq'
directory = 'src/main/java'
}
}
}
}
}
}