-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
73 lines (63 loc) · 1.93 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
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'
apply plugin: 'org.springframework.boot'
apply plugin: 'java'
buildscript {
ext {
kotlinVersion = '1.1.1'
springBootVersion = '1.5.2.RELEASE'
mysqlVersion = '5.1.41'
hikariCPVersion = '2.6.1'
swaggerVersion = '2.6.1'
}
repositories {
jcenter()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
jar {
baseName = 'phonebook-api'
}
sourceCompatibility = 1.8
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
test.java.srcDirs += 'src/test/kotlin'
}
repositories {
jcenter()
}
configurations {
providedRuntime
}
dependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib-jre8:${kotlinVersion}")
compile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
compile("org.springframework.boot:spring-boot-starter-web:${springBootVersion}")
compile("org.springframework.boot:spring-boot-starter-data-jpa:${springBootVersion}")
compile("io.springfox:springfox-swagger2:${swaggerVersion}")
compile("io.springfox:springfox-swagger-ui:${swaggerVersion}")
runtime("mysql:mysql-connector-java:${mysqlVersion}")
runtime("com.zaxxer:HikariCP:${hikariCPVersion}")
providedRuntime("org.springframework.boot:spring-boot-starter-tomcat:${springBootVersion}")
testCompile("org.springframework.boot:spring-boot-starter-test:${springBootVersion}")
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4.1'
}
task copyTask(type: Copy) {
from 'build/libs/phonebook-api.jar'
into 'image/'
}
build.finalizedBy(copyTask)