forked from bwajtr/java-persistence-frameworks-comparison
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjooq.gradle
68 lines (58 loc) · 1.72 KB
/
jooq.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
// You can invoke JOOQ code generation using this script.
// Just run it from IDE, or to force code generation use "gradle --rerun-tasks -b jooq.gradle"
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "nu.studer:gradle-jooq-plugin:2.0.2" // to allow jooq gradle plugin
}
}
apply plugin: 'nu.studer.jooq' // see details in https://github.com/etiennestuder/gradle-jooq-plugin
apply plugin: 'java'
defaultTasks 'generateDbTestsApplicationJooqSchemaSource'
repositories {
jcenter()
}
group = 'com.clevergang'
version = '1.0.0'
repositories {
jcenter()
}
// We need Java8 for this project
tasks.withType(JavaCompile) {
sourceCompatibility = '1.8'
}
dependencies {
jooqRuntime "org.postgresql:postgresql:9.4.1212"
}
// jooq configuration
jooq {
version = '3.8.4'
edition = 'OSS' // the default (can be omitted), other allowed values are PRO, PRO_JAVA_6, and TRIAL
DbTestsApplication(sourceSets.main) {
jdbc {
driver = 'org.postgresql.Driver'
url = 'jdbc:postgresql://localhost:5432/testdb'
user = 'test'
password = 'test'
schema = 'public'
}
generator {
name = 'org.jooq.util.DefaultGenerator'
strategy {
name = 'org.jooq.util.DefaultGeneratorStrategy'
}
database {
name = 'org.jooq.util.postgres.PostgresDatabase'
inputSchema = 'public'
}
target {
packageName = 'com.clevergang.dbtests.repository.impl.jooq.generated'
directory = './src/main/java/'
}
}
}
}