-
Notifications
You must be signed in to change notification settings - Fork 80
/
build.gradle.kts
53 lines (48 loc) · 1.38 KB
/
build.gradle.kts
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
plugins {
id("nu.studer.jooq") version "9.0"
id("java")
}
repositories {
mavenCentral()
}
dependencies {
jooqGenerator("com.h2database:h2:2.1.214")
}
jooq {
configurations {
create("main") {
jooqConfiguration.apply {
logging = org.jooq.meta.jaxb.Logging.WARN
jdbc.apply {
driver = "org.h2.Driver"
url = "jdbc:h2:~/test;AUTO_SERVER=TRUE"
user = "sa"
password = ""
}
generator.apply {
name = "org.jooq.codegen.DefaultGenerator"
database.apply {
name = "org.jooq.meta.h2.H2Database"
includes = ".*"
excludes = ""
}
target.apply {
packageName = "nu.studer.sample"
}
}
}
}
}
}
// by default, generateJooq will use the configured java toolchain, if any
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.named<nu.studer.gradle.jooq.JooqGenerate>("generateJooq") {
// generateJooq can be configured to use a different/specific toolchain
(launcher::set)(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(18))
})
}