-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
132 lines (126 loc) · 4.08 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
125
126
127
128
129
130
131
132
buildscript {
ext {
kotlinVersion = '1.2.70'
springBootVersion = '2.0.5.RELEASE'
}
ext['jooq.version'] = '3.11.5'
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter/' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://plugins.gradle.org/m2/' }
maven { url 'https://maven.google.com' }
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}")
//flyway
classpath "gradle.plugin.com.boxfuse.client:gradle-plugin-publishing:5.1.4"
//jooq
classpath 'nu.studer:gradle-jooq-plugin:3.0.2+'
}
}
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
//apply plugin: "org.flywaydb.flyway"
apply plugin: 'nu.studer.jooq'
group = 'cn.zenliu'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ["-Xjsr305=strict"]
jvmTarget = "1.8"
}
}
repositories {
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter/' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'https://maven.google.com' }
mavenCentral()
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile('org.springframework.boot:spring-boot-starter-jdbc')
compile('org.springframework.boot:spring-boot-starter-jooq')
compile('org.springframework.boot:spring-boot-starter-webflux')
compile('com.fasterxml.jackson.module:jackson-module-kotlin')
compile('com.h2database:h2')
jooqRuntime('com.h2database:h2')
compile('org.flywaydb:flyway-core')
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compile("org.jetbrains.kotlin:kotlin-reflect")
runtime('org.springframework.boot:spring-boot-devtools')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('io.projectreactor:reactor-test')
}
/*flyway {
url = 'jdbc:mysql://192.168.99.100:3306/quest?useSSL=false&serverTimezone=CST'
user = '***'
password='***'
schemas = ['quest']
placeholders = [
'prefix': 'q'
]
}*/
task BuildWebUI(type: Exec) {
group='webui'
description='build web ui'
workingDir './ui'
commandLine 'cmd', "/c yarn genspa"
}
task SyncWebUI(type:Sync){
group='webui'
description=' sync web ui'
from("./ui/dist")
into("./src/main/resources/static")
}
bootJar.dependsOn += SyncWebUI
jooq {
version = '3.11.5'
model(sourceSets.main) {
jdbc {
driver = 'org.h2.Driver'
url = 'jdbc:h2:file:./config/conf;CIPHER=AES;MODE=MYSQL;DB_CLOSE_DELAY=-1'
user = 'cmnt'
password = 'cmnt cmnt'
}
generator {
name = 'org.jooq.codegen.JavaGenerator'
strategy {
name = 'org.jooq.codegen.DefaultGeneratorStrategy'
}
database {
name = 'org.jooq.meta.h2.H2Database'
inputSchema = 'public'
}
generate {
relations = true
deprecated = false
records = true
immutablePojos = false
fluentSetters = true
serializablePojos = true
daos = true
springAnnotations = true
javaTimeTypes = true
}
target {
packageName = 'cn.zenliu.jcef.model'
directory = 'src/main/java' //Location of gen code
}
}
}
}
compileJava.dependsOn -= 'generateModelJooqSchemaSource'