Skip to content

Commit 1603aa3

Browse files
committed
unify java target to 11, fix warnings, update containers
1 parent 5e9b633 commit 1603aa3

File tree

14 files changed

+36
-42
lines changed

14 files changed

+36
-42
lines changed

buildSrc/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ dependencies {
2727
}
2828
val compileKotlin: KotlinCompile by tasks
2929
compileKotlin.kotlinOptions {
30-
jvmTarget = "1.8"
30+
jvmTarget = "11"
3131
}
3232
val compileTestKotlin: KotlinCompile by tasks
3333
compileTestKotlin.kotlinOptions {
34-
jvmTarget = "1.8"
34+
jvmTarget = "11"
3535
}

buildSrc/src/main/kotlin/Dependencies.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ fun isReleaseVersion(): Boolean {
1515
object FloodplainDeps {
1616
const val kotlin = FloodplainPlugins.kotlin
1717
const val floodplain_version = "1.11.7-SNAPSHOT"
18-
const val jackson_version = "2.13.3"
18+
const val jackson_version = "2.14.1"
1919
const val kafka_version = "3.3.1!!"
2020
const val slf4j_version = "1.7.36"
21-
const val mysql_version = "8.0.23"
21+
const val mysql_version = "8.0.31"
2222
const val mongodb_version = "4.5.0"
2323
const val debezium_version = "2.1.1.Final"
2424
const val testContainer_version = "1.17.6"
25-
const val kotlin_coroutines_version = "1.6.0"
26-
const val junit_5_version = "5.8.2"
25+
const val kotlin_coroutines_version = "1.6.4"
26+
const val junit_5_version = "5.9.2"
2727
const val debeziumPostgres = "io.debezium:debezium-connector-postgres:$debezium_version"
2828
const val debeziumMySQL = "io.debezium:debezium-connector-mysql:$debezium_version"
2929
const val debeziumEmbedded = "io.debezium:debezium-embedded:$debezium_version"

floodplain-api/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ repositories {
1414
}
1515
val compileKotlin: KotlinCompile by tasks
1616
compileKotlin.kotlinOptions {
17-
jvmTarget = "1.8"
17+
jvmTarget = "11"
1818
}
1919
val compileTestKotlin: KotlinCompile by tasks
2020
compileTestKotlin.kotlinOptions {
21-
jvmTarget = "1.8"
21+
jvmTarget = "11"
2222
}

floodplain-debezium/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ repositories {
2222
}
2323
val compileKotlin: KotlinCompile by tasks
2424
compileKotlin.kotlinOptions {
25-
jvmTarget = "1.8"
25+
jvmTarget = "11"
2626
}
2727
val compileTestKotlin: KotlinCompile by tasks
2828
compileTestKotlin.kotlinOptions {
29-
jvmTarget = "1.8"
29+
jvmTarget = "11"
3030
}

floodplain-debezium/src/test/kotlin/TestMySQL.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class TestMySQL {
4242
var offsetFilePath: Path? = null
4343

4444
private val postgresContainer = InstantiatedContainer(
45-
"debezium/example-mysql:1.9.2.Final",
45+
"debezium/example-mysql:2.1.1.Final",
4646
3306,
4747
mapOf(
4848
"MYSQL_ROOT_PASSWORD" to "debezium",

floodplain-dsl/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ repositories {
3737
}
3838
val compileKotlin: KotlinCompile by tasks
3939
compileKotlin.kotlinOptions {
40-
jvmTarget = "1.8"
40+
jvmTarget = "11"
4141
}
4242
val compileTestKotlin: KotlinCompile by tasks
4343
compileTestKotlin.kotlinOptions {
44-
jvmTarget = "1.8"
44+
jvmTarget = "11"
4545
}

floodplain-elasticsearch/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ repositories {
2727
}
2828
val compileKotlin: KotlinCompile by tasks
2929
compileKotlin.kotlinOptions {
30-
jvmTarget = "1.8"
30+
jvmTarget = "11"
3131
}
3232
val compileTestKotlin: KotlinCompile by tasks
3333
compileTestKotlin.kotlinOptions {
34-
jvmTarget = "1.8"
34+
jvmTarget = "11"
3535
}

floodplain-example/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ repositories {
3333
}
3434
val compileKotlin: KotlinCompile by tasks
3535
compileKotlin.kotlinOptions {
36-
jvmTarget = "1.8"
36+
jvmTarget = "11"
3737
}
3838
val compileTestKotlin: KotlinCompile by tasks
3939
compileTestKotlin.kotlinOptions {
40-
jvmTarget = "1.8"
40+
jvmTarget = "11"
4141
}

floodplain-googlesheets/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ repositories {
5656
}
5757
val compileKotlin: KotlinCompile by tasks
5858
compileKotlin.kotlinOptions {
59-
jvmTarget = "1.8"
59+
jvmTarget = "11"
6060
}
6161
val compileTestKotlin: KotlinCompile by tasks
6262
compileTestKotlin.kotlinOptions {
63-
jvmTarget = "1.8"
63+
jvmTarget = "11"
6464
}

floodplain-integration/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ repositories {
4141
}
4242
val compileKotlin: KotlinCompile by tasks
4343
compileKotlin.kotlinOptions {
44-
jvmTarget = "1.8"
44+
jvmTarget = "11"
4545
}
4646
val compileTestKotlin: KotlinCompile by tasks
4747
compileTestKotlin.kotlinOptions {
48-
jvmTarget = "1.8"
48+
jvmTarget = "11"
4949
}

floodplain-integration/src/test/kotlin/io.floodplain.integration/MySQLTest.kt

+8-14
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@ import io.floodplain.mongodb.waitForMongoDbCondition
3434
import io.floodplain.test.InstantiatedContainer
3535
import io.floodplain.test.useIntegraton
3636
import kotlinx.coroutines.delay
37-
import org.junit.After
38-
import org.junit.Before
39-
import org.junit.jupiter.api.AfterAll
4037
import org.junit.jupiter.api.Assertions.*
4138
import org.junit.jupiter.api.Disabled
4239
import org.junit.jupiter.api.Test
@@ -47,13 +44,10 @@ private val logger = mu.KotlinLogging.logger {}
4744
@Suppress("UNCHECKED_CAST")
4845
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
4946
class MySQLTest {
50-
// private var mysqlContainer: InstantiatedContainer = createMySql()
51-
// private var mongoContainer: InstantiatedContainer = createMongodb() //= InstantiatedContainer("mongo:latest", 27017)
5247

53-
54-
fun createMySql(): InstantiatedContainer {
48+
private fun createMySql(): InstantiatedContainer {
5549
return InstantiatedContainer(
56-
"debezium/example-mysql:1.6",
50+
"debezium/example-mysql:2.1.1.Final",
5751
3306,
5852
mapOf(
5953
"MYSQL_ROOT_PASSWORD" to "mysecretpassword",
@@ -65,7 +59,7 @@ class MySQLTest {
6559
)
6660
}
6761

68-
fun createMongodb(): InstantiatedContainer {
62+
private fun createMongodb(): InstantiatedContainer {
6963
return InstantiatedContainer("mongo:latest", 27017)
7064
}
7165

@@ -139,15 +133,15 @@ class MySQLTest {
139133
)
140134
val mongoConfig = remoteMongoConfig(
141135
"mongosink",
142-
"mongodb://${mongoContainer?.host}:${mongoContainer?.exposedPort}",
136+
"mongodb://${mongoContainer.host}:${mongoContainer.exposedPort}",
143137
"@mongodump"
144138
)
145139
mysqlSource("inventory.customers", mysqlConfig) {
146140
toMongo("customers", "$generation-customers", mongoConfig)
147141
}
148142
}.runWithArguments { topologyContext ->
149143
val hits = waitForMongoDbCondition(
150-
"mongodb://${mongoContainer?.host}:${mongoContainer?.exposedPort}",
144+
"mongodb://${mongoContainer.host}:${mongoContainer.exposedPort}",
151145
"${topologyContext.generation}-mongodump"
152146
) { database ->
153147
val customerCount = database.getCollection("customers").countDocuments()
@@ -182,7 +176,7 @@ class MySQLTest {
182176
)
183177
val mongoConfig = remoteMongoConfig(
184178
"mongosink",
185-
"mongodb://${mongoContainer?.host}:${mongoContainer?.exposedPort}",
179+
"mongodb://${mongoContainer.host}:${mongoContainer.exposedPort}",
186180
"$generation-mongodump"
187181
)
188182
mysqlSource("inventory.customers", mysqlConfig) {
@@ -208,8 +202,8 @@ class MySQLTest {
208202
join {
209203
mysqlSource("inventory.products_on_hand", mysqlConfig) {}
210204
}
211-
set { _, product, product_on_hand ->
212-
product["quantity"] = product_on_hand.integer("quantity")
205+
set { _, product, productOnHand ->
206+
product["quantity"] = productOnHand.integer("quantity")
213207
product
214208
}
215209
toMongo("products", "$generation-products", mongoConfig)

floodplain-jdbc/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ repositories {
2525
}
2626
val compileKotlin: KotlinCompile by tasks
2727
compileKotlin.kotlinOptions {
28-
jvmTarget = "1.8"
28+
jvmTarget = "11"
2929
}
3030
val compileTestKotlin: KotlinCompile by tasks
3131
compileTestKotlin.kotlinOptions {
32-
jvmTarget = "1.8"
32+
jvmTarget = "11"
3333
}

floodplain-mongodb/build.gradle.kts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88
dependencies {
99
implementation(FloodplainDeps.kotlinLogging)
1010
implementation(project(":floodplain-stream-topology"))
11-
implementation("org.mongodb.kafka:mongo-kafka-connect:1.7.0")
11+
implementation("org.mongodb.kafka:mongo-kafka-connect:1.9.0")
1212
implementation(FloodplainDeps.kafkaConnectRuntime)
1313
implementation(project(":streams-api"))
1414
implementation(project(":streams"))
@@ -26,9 +26,9 @@ repositories {
2626
}
2727
val compileKotlin: KotlinCompile by tasks
2828
compileKotlin.kotlinOptions {
29-
jvmTarget = "1.8"
29+
jvmTarget = "11"
3030
}
3131
val compileTestKotlin: KotlinCompile by tasks
3232
compileTestKotlin.kotlinOptions {
33-
jvmTarget = "1.8"
33+
jvmTarget = "11"
3434
}

floodplain-test/build.gradle.kts

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ repositories {
1616
}
1717
val compileKotlin: KotlinCompile by tasks
1818
compileKotlin.kotlinOptions {
19-
jvmTarget = "1.8"
19+
jvmTarget = "11"
2020
}
2121
val compileTestKotlin: KotlinCompile by tasks
2222
compileTestKotlin.kotlinOptions {
23-
jvmTarget = "1.8"
23+
jvmTarget = "11"
2424
}

0 commit comments

Comments
 (0)