-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
69 lines (50 loc) · 1.46 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
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'org.springframework.boot'
group 'org.demo'
version 'development'
buildscript {
repositories {
mavenCentral()
}
dependencies {
def springBootVersion = "1.5.4.RELEASE"
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
ext {
lombokVersion = "1.16.16"
}
configurations {
dev
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile "com.fasterxml.jackson.core:jackson-annotations"
compile "com.fasterxml.jackson.core:jackson-databind"
// Spring core
compile "org.springframework.boot:spring-boot-starter"
// Persistence
compile "mysql:mysql-connector-java"
compile "org.springframework.boot:spring-boot-starter-data-jpa"
// Web
compile "org.springframework:spring-websocket"
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compileOnly "org.projectlombok:lombok:${lombokVersion}"
dev("org.springframework.boot:spring-boot-devtools")
testCompile "junit:junit"
}
bootRun {
// Use Spring Boot DevTool only when we run Gradle bootRun task
classpath = sourceSets.main.runtimeClasspath + configurations.dev
}
task copyJar(type: Copy) {
from jar // here it automatically reads jar file produced from jar task
into '.'
}
build.dependsOn copyJar