Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 70377ec

Browse files
author
Navid Rojiani
committed
Update Dependencies
1 parent 4fcdce6 commit 70377ec

File tree

4 files changed

+62
-44
lines changed

4 files changed

+62
-44
lines changed

‎build.gradle

Lines changed: 52 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,67 @@
1+
apply from: 'dependencies.gradle'
2+
13
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+
}
1015
}
1116

17+
apply plugin: 'idea'
1218
apply plugin: 'kotlin'
1319
apply plugin: 'kotlin-spring'
1420
apply plugin: 'org.springframework.boot'
1521

1622
repositories {
17-
mavenCentral()
23+
mavenCentral()
1824
}
1925

20-
2126
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"
4231

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"
4546
}
4647

4748
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+
}

‎dependencies.gradle

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ext {
2+
/* Source Dependency Versions */
3+
jacksonVersion = '2.10.0'
4+
kotlinVersion = '1.3.50'
5+
springBootVersion = '2.2.0.RELEASE'
6+
7+
/* Test Dependency Versions */
8+
junitVersion = '5.4.2'
9+
}

‎gradle.properties

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +0,0 @@
1-
jacksonVersion=2.9.1
2-
junitVersion=4.12
3-
kotlinVersion=1.2.21
4-
mockitoVersion=1.10.19
5-
powerMockVersion=1.7.3
6-
springBootVersion=1.5.10.RELEASE

‎src/main/kotlin/tutorial/FirstController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class FirstController {
5252
* @param user The details of the user to create
5353
*/
5454
@ResponseStatus(HttpStatus.CREATED)
55-
@RequestMapping(value = "/user", method = [RequestMethod.POST])
55+
@RequestMapping(value = ["/user"], method = [RequestMethod.POST])
5656
fun createUser(@RequestBody user: NewUser): User = User(
5757
username = user.username,
5858
screenName = user.screenName,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /