-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
171 lines (139 loc) · 4.92 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
buildscript {
ext {
kotlinVersion = "1.0.5"
springBootVersion = "1.4.2.RELEASE"
jjwtVersion = "0.7.0"
gradleNodePluginVersion = "1.0.1"
reflectionsVersion = "0.9.10"
typescriptGeneratorVersion = "1.12.236"
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath group: "org.springframework.boot", name: "spring-boot-gradle-plugin", version: "${springBootVersion}"
classpath group: "org.jetbrains.kotlin", name: "kotlin-gradle-plugin", version: "${kotlinVersion}"
classpath group: "com.moowork.gradle", name: "gradle-node-plugin", version: "${gradleNodePluginVersion}"
classpath group: "cz.habarta.typescript-generator", name: "typescript-generator-gradle-plugin", version: "${typescriptGeneratorVersion}"
}
}
apply plugin: "java"
apply plugin: "kotlin"
apply plugin: "eclipse"
apply plugin: "org.springframework.boot"
apply plugin: "cz.habarta.typescript-generator"
apply plugin: "com.moowork.node"
apply plugin: "jacoco"
project.version = "0.0.1-SNAPSHOT"
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
node {
version = "6.9.1"
npmVersion = "3.10.8"
yarnVersion = "0.18.1"
download = true
workDir = file("${project.buildDir}/nodejs")
npmWorkDir = file("${project.buildDir}/npm")
yarnWorkDir = file("${project.buildDir}/yarn")
nodeModulesDir = file("${project.projectDir}")
}
generateTypeScript {
jsonLibrary = "jackson2"
classPatterns = [
"com.shardis.**.*Dto"
]
outputFile = "${project.buildDir}/../src/main/typescript/app/shared/kotlin.ts"
outputKind = "global"
namespace = "Kotlin"
noFileComment = true
outputFileType = "implementationFile"
}
jar {
baseName = "shardis-kotlin-angular2"
version = project.version
}
test {
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
afterTest { desc, result ->
println "Executed test ${desc.name} [${desc.className}] with result: ${result.resultType}"
}
}
jacocoTestReport {
dependsOn "test"
reports {
html.enabled = true
xml.enabled = true
html.destination = "${project.buildDir}/jacocoHtml"
}
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
sourceSets {
main.java.srcDirs += "src/main/kotlin"
}
processResources {
filesMatching("**/application.yml") {
expand(project.properties)
}
filesMatching("**/bootstrap.yml") {
expand(project.properties)
}
}
configurations {
compile.exclude group: "org.springframework.boot", module: "spring-boot-starter-tomcat"
}
dependencies {
compile group: "org.springframework.boot", name: "spring-boot-starter-actuator"
compile group: "org.springframework.boot", name: "spring-boot-actuator-docs"
compile group: "org.springframework.boot", name: "spring-boot-starter-cache"
compile group: "org.springframework.boot", name: "spring-boot-starter-data-jpa"
compile group: "org.springframework.boot", name: "spring-boot-devtools"
compile group: "org.springframework.boot", name: "spring-boot-starter-mail"
compile group: "org.springframework.boot", name: "spring-boot-starter-security"
compile group: "org.springframework.boot", name: "spring-boot-starter-validation"
compile group: "org.springframework.boot", name: "spring-boot-starter-undertow"
compile group: "org.springframework.boot", name: "spring-boot-starter-web"
compile group: "org.springframework.boot", name: "spring-boot-starter-websocket"
compile group: "org.springframework.boot", name: "spring-boot-configuration-processor"
kapt group: "org.springframework.boot", name: "spring-boot-configuration-processor"
compile group: "org.hibernate", name: "hibernate-java8"
compile group: "org.hibernate", name: "hibernate-envers"
compile group: "com.fasterxml.jackson.datatype", name: "jackson-datatype-jsr310"
compile group: "org.jetbrains.kotlin", name: "kotlin-stdlib", version: "${kotlinVersion}"
compile group: "io.jsonwebtoken", name: "jjwt", version: "${jjwtVersion}"
runtime group: "com.h2database", name: "h2"
runtime group: "org.postgresql", name: "postgresql"
testCompile group: "org.springframework.boot", name: "spring-boot-starter-test"
testCompile group: "org.springframework.security", name: "spring-security-test"
testCompile group: "org.springframework.restdocs", name: "spring-restdocs-mockmvc"
testCompile group: "org.reflections", name: "reflections", version: "${reflectionsVersion}"
}
task ngBuild(type: YarnTask) {
args = ["run", "build:prod"]
}
task ngTest(type: YarnTask) {
args = ["run", "test:phantom"]
}
task ngServer(type: YarnTask) {
args = ["run", "server:dev"]
}
task ngDocs(type: YarnTask) {
args = ["run", "docs"]
}
task changelog(type: YarnTask) {
args = ["run", "changelog"]
}
yarn_install.dependsOn yarnSetup
ngBuild.dependsOn yarn_install
ngTest.dependsOn yarn_install
processResources.dependsOn ngBuild
test.dependsOn ngTest
clean.delete << file("node_modules")