forked from geowarin/graphql-webflux
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.gradle
124 lines (111 loc) · 3.68 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
buildscript {
ext {
kotlinVersion = '1.2.60'
springBootVersion = '2.0.4.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
}
}
plugins {
id 'nu.studer.jooq' version '3.0.1'
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'nu.studer.jooq'
group = 'com.yg'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
kotlin {
experimental {
coroutines 'enable'
}
}
repositories {
mavenCentral()
}
dependencies {
compile("org.springframework.boot:spring-boot-starter-webflux")
compile("org.springframework.boot:spring-boot-starter-jooq:2.0.3.RELEASE")
compile("com.fasterxml.jackson.module:jackson-module-kotlin")
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect")
compile("com.graphql-java:graphql-java:9.1")
compile("com.graphql-java:graphql-java-tools:5.2.0")
compile("com.graphql-java:java-dataloader:2.0.2")
compile("org.junit.jupiter:junit-jupiter-api")
compile("org.jooq:jooq:3.11.2")
compile("org.jooq:jooq-meta:3.11.2")
compile("org.jooq:jooq-codegen:3.11.2")
compile("io.reactiverse:reactive-pg-client:0.9.0")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-core:0.24.0")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8:0.24.0")
compile("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:0.24.0")
runtime("org.springframework.boot:spring-boot-devtools")
runtime("org.junit.jupiter:junit-jupiter-engine")
runtime("org.postgresql:postgresql")
jooqRuntime("org.postgresql:postgresql")
jooqRuntime("org.jooq:jooq:3.11.2")
jooqRuntime("org.jooq:jooq-meta:3.11.2")
jooqRuntime("org.jooq:jooq-codegen:3.11.2")
testCompile("org.springframework.boot:spring-boot-starter-test")
testCompile("io.projectreactor:reactor-test")
}
test {
useJUnitPlatform {}
}
jooq {
version = '3.11.2'
edition = 'OSS'
tables(sourceSets.main) {
jdbc {
driver = 'org.postgresql.Driver'
url = 'jdbc:postgresql://localhost:5432/gqlwfdl'
user = 'postgres'
password = 'postgres'
}
generator {
name = 'org.jooq.codegen.DefaultGenerator'
database {
name = 'org.jooq.meta.postgres.PostgresDatabase'
inputSchema = 'public'
includes = '.*'
excludes = ''
}
target {
packageName = 'com.yg.gqlwfdl.dataaccess.db'
directory = 'src/main/java'
}
}
}
}
// Only generate the jOOQ wrappers from the database if explicitly requested, not as part of a normal build.
generateTablesJooqSchemaSource.onlyIf { name != 'build' }
// The below is required to make the gradle task for generating the jOOQ wrappers work with Java 10.
// See https://github.com/jOOQ/jOOQ/issues/6477 and https://github.com/etiennestuder/gradle-jooq-plugin/issues/55
// for more details.
tasks.generateTablesJooqSchemaSource.with {
javaExecSpec = { JavaExecSpec s ->
s.jvmArgs '--add-modules', 'java.xml.bind'
}
}