Skip to content

Commit 0be6b72

Browse files
committed
🐔 upgrade: Kotlin 1.1.60 , Gradle 4.4
1 parent f54b65b commit 0be6b72

File tree

10 files changed

+34
-27
lines changed

10 files changed

+34
-27
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This sample application showcases patterns to implement better **Observability**
3030
* Docker deployment
3131

3232
### Prerequisites
33-
1. Gradle 4 (Install via [sdkman](http://sdkman.io/))
33+
1. Gradle 4.4 (Install via [sdkman](http://sdkman.io/))
3434
2. Docker for Mac [Setup Instructions](./docs/docker.md)
3535

3636
### Build
@@ -105,6 +105,7 @@ docker ps
105105
```bash
106106
# upgrade project gradle version
107107
gradle wrapper --gradle-version 4.3 --distribution-type all
108+
gradle wrapper --gradle-version 4.4-rc-1 --distribution-type all
108109
# gradle daemon status
109110
gradle --status
110111
gradle --stop

build.gradle.kts

+1-14
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,8 @@ val logbackKafkaAppenderVersion by project
66
val logstashLogbackEncoderVersion by project
77
val kafkaVersion by project
88

9-
//uncomment this block for first time and run `./gradlew clean`, then you can remove this block. https://github.com/gradle/kotlin-dsl/issues/547
10-
//buildscript {
11-
// val springBootVersion = "2.0.0.M6"
12-
//
13-
// repositories {
14-
// mavenCentral()
15-
// maven("https://repo.spring.io/milestone")
16-
// }
17-
// dependencies {
18-
// classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
19-
// }
20-
//}
21-
229
plugins {
23-
val kotlinVersion = "1.1.51"
10+
val kotlinVersion = "1.1.60"
2411
val springDependencyManagement = "1.0.3.RELEASE"
2512
val springBootVersion = "2.0.0.M6" //TODO: "2.0.0.RELEASE"
2613
val junitGradleVersion = "1.0.1"

cassandra-data-service/src/main/kotlin/com/example/domain/GuestBookEntry.kt

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.example.domain
22

3+
import com.fasterxml.jackson.annotation.JsonFormat
34
import com.datastax.driver.core.utils.UUIDs
45
import org.springframework.data.cassandra.core.cql.PrimaryKeyType.*
56
import org.springframework.data.cassandra.core.cql.Ordering
@@ -15,6 +16,7 @@ data class GuestBookEntry(
1516
@PrimaryKeyColumn(type = PARTITIONED, ordinal = 0)
1617
val name: String,
1718
val comment: String,
19+
//@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "en_US", timezone = "America/Los_Angeles")
1820
@PrimaryKeyColumn(type = CLUSTERED, ordinal = 1, ordering = Ordering.DESCENDING)
1921
val time: LocalDateTime = LocalDateTime.now()
20-
)
22+
)

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description=Open Compute Showcase Apps
33
version=0.1.0-SNAPSHOT
44

55
# kotlin
6-
kotlinVersion=1.1.51
6+
kotlinVersion=1.1.60
77
spekVersion=1.0.89
88
mockitoVersion=2.1.0-beta.125
99
mockitoKotlinVersion=0.6.1

gradle/wrapper/gradle-wrapper.jar

-393 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
33
zipStoreBase=GRADLE_USER_HOME
44
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip
5+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-rc-1-all.zip

settings.gradle settings.gradle.kts

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
pluginManagement {
22
repositories {
33
gradlePluginPortal()
4-
maven { url "https://repo.spring.io/milestone" }
5-
maven { url "https://jcenter.bintray.com/" }
4+
maven { url = uri("https://repo.spring.io/milestone") }
5+
maven { url = uri("https://jcenter.bintray.com/") }
66
}
77

88
resolutionStrategy {
@@ -16,5 +16,4 @@ pluginManagement {
1616
}
1717
}
1818
}
19-
20-
include 'shared', 'cassandra-data-service', 'stream-service', 'ui-app', 'kafka-influxdb-service'
19+
include("shared", "cassandra-data-service", "stream-service", "ui-app", "kafka-influxdb-service")

stream-service/src/main/kotlin/com/example/StreamApplication.kt

+15-5
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,11 @@ import java.time.Instant
2424
import java.util.*
2525
import kotlin.coroutines.experimental.buildIterator
2626
import reactor.kafka.receiver.KafkaReceiver
27-
//import org.springframework.context.support.*
2827
import org.slf4j.MDC
28+
import org.springframework.boot.ApplicationRunner
29+
import org.springframework.boot.builder.SpringApplicationBuilder
2930
import org.springframework.boot.runApplication
31+
import org.springframework.context.support.beans
3032

3133
@SpringBootApplication
3234
class StreamApplication
@@ -160,10 +162,18 @@ class QuoteGenerator {
160162

161163
fun main(args: Array<String>) {
162164
runApplication<StreamApplication>(*args)
163-
// SpringApplication(Application::class.java).apply {
164-
// addInitializers(beans())
165-
// run(*args)
166-
// }
165+
// SpringApplicationBuilder().initializers(
166+
// beans {
167+
// bean {
168+
// ApplicationRunner {
169+
// val quoteGenerator = ref<QuoteGenerator>()
170+
// // to something
171+
// }
172+
// }
173+
// }
174+
// )
175+
// .sources(StreamApplication::class.java)
176+
// .run(*args)
167177
}
168178

169179

stream-service/src/main/resources/application.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
server:
22
port: ${PORT:8082}
3+
# port: ${PORT:8482}
4+
# http2:
5+
# enabled: true
6+
# ssl:
7+
# key-store: classpath:keystore.jks
8+
# key-store-password: secret
9+
# key-password: password
10+
311
#logging:
412
# level:
513
# root: debug
2.21 KB
Binary file not shown.

0 commit comments

Comments
 (0)