1
+ apply from : ' dependencies.gradle'
2
+
1
3
buildscript {
2
- repositories {
3
- mavenCentral()
4
- }
5
- dependencies {
6
- classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
7
- classpath " org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion "
8
- classpath " org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion "
9
- }
4
+ apply from : ' dependencies.gradle'
5
+
6
+ repositories {
7
+ mavenCentral()
8
+ }
9
+
10
+ dependencies {
11
+ classpath " org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion "
12
+ classpath " org.jetbrains.kotlin:kotlin-allopen:$kotlinVersion "
13
+ classpath " org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion "
14
+ }
10
15
}
11
16
17
+ apply plugin : ' idea'
12
18
apply plugin : ' kotlin'
13
19
apply plugin : ' kotlin-spring'
14
20
apply plugin : ' org.springframework.boot'
15
21
16
22
repositories {
17
- mavenCentral()
23
+ mavenCentral()
18
24
}
19
25
20
-
21
26
dependencies {
22
- // Kotlin Dependencies
23
- compile " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion "
24
- compile " org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion "
25
- testCompile " org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion "
26
-
27
- // Spring Dependencies
28
- compile(" org.springframework.boot:spring-boot-starter-web:$springBootVersion " ) {
29
- exclude module : " spring-boot-starter-tomcat"
30
- }
31
- compile " org.springframework.boot:spring-boot-starter-jetty:$springBootVersion "
32
- compile " org.springframework.boot:spring-boot-starter-actuator:$springBootVersion "
33
-
34
- // Jackson Dependencies
35
- compile " com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion "
36
- compile " com.fasterxml.jackson.core:jackson-core:$jacksonVersion "
37
- compile " com.fasterxml.jackson.core:jackson-databind:$jacksonVersion "
38
- runtime " com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion "
39
- runtime " com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion "
40
- runtime " com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion "
41
- }
27
+ apply from : ' dependencies.gradle'
28
+
29
+ implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion "
30
+ implementation " org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion "
42
31
43
- task wrapper (type : Wrapper ) {
44
- gradleVersion = " 4.5.1"
32
+ implementation(" org.springframework.boot:spring-boot-starter-web:$springBootVersion " ) {
33
+ exclude module : " spring-boot-starter-tomcat"
34
+ }
35
+ implementation " org.springframework.boot:spring-boot-starter-jetty:$springBootVersion "
36
+ implementation " org.springframework.boot:spring-boot-starter-actuator:$springBootVersion "
37
+
38
+ implementation " com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion "
39
+ implementation " com.fasterxml.jackson.core:jackson-core:$jacksonVersion "
40
+ implementation " com.fasterxml.jackson.core:jackson-databind:$jacksonVersion "
41
+ runtime " com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion "
42
+ runtime " com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion "
43
+ runtime " com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion "
44
+
45
+ testImplementation " org.jetbrains.kotlin:kotlin-test-junit:$kotlinVersion "
45
46
}
46
47
47
48
test {
48
- testLogging {
49
- exceptionFormat = ' full'
50
- events = [" passed" , " failed" , " skipped" ]
51
- }
52
- }
49
+ useJUnitPlatform()
50
+
51
+ testLogging {
52
+ exceptionFormat = ' full'
53
+ events = [" passed" , " failed" , " skipped" ]
54
+ }
55
+
56
+ // Fail the 'test' task on the first test failure
57
+ failFast = true
58
+ }
59
+
60
+ idea {
61
+ module {
62
+ // When building the project in IntelliJ, use the same output path as Gradle.
63
+ inheritOutputDirs = false
64
+ outputDir = compileJava. destinationDir
65
+ testOutputDir = compileTestJava. destinationDir
66
+ }
67
+ }
0 commit comments