Skip to content

Commit 67cc4b2

Browse files
committed
Add jackson 2.9.0 and 2.14.2 tests
1 parent 465105b commit 67cc4b2

File tree

3 files changed

+51
-0
lines changed

3 files changed

+51
-0
lines changed

temporal-kotlin/build.gradle

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
2+
import org.gradle.api.plugins.jvm.JvmTestSuite
23

34
plugins {
45
id 'org.jlleitschuh.gradle.ktlint' version '11.3.1'
@@ -43,3 +44,27 @@ task registerNamespace(type: JavaExec) {
4344

4445
test.dependsOn 'registerNamespace'
4546

47+
def jacksonVersions = ['2.9.0', "$jacksonVersion".toString()]
48+
49+
testing {
50+
suites {
51+
jacksonVersions.forEach { jacksonVersion ->
52+
"jackson${jacksonVersion}Test"(JvmTestSuite) {
53+
useJUnit(junitVersion)
54+
dependencies {
55+
implementation project()
56+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion!!"
57+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion!!"
58+
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion!!") {
59+
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-reflect'
60+
}
61+
62+
implementation project(':temporal-testing')
63+
implementation "junit:junit:${junitVersion}"
64+
}
65+
}
66+
}
67+
}
68+
}
69+
70+
test.dependsOn("jackson2.9.0Test", "jackson2.14.2Test")
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.temporal.common.converter
2+
3+
import com.fasterxml.jackson.module.kotlin.PackageVersion
4+
import org.junit.Assert.assertEquals
5+
import org.junit.Test
6+
7+
class KotlinObjectMapperFactoryTest {
8+
@Test
9+
fun `test jackson 2 14 2`() {
10+
assertEquals(PackageVersion.VERSION.toString(), "2.14.2")
11+
KotlinObjectMapperFactory.new()
12+
}
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package io.temporal.common.converter
2+
3+
import com.fasterxml.jackson.module.kotlin.PackageVersion
4+
import org.junit.Assert.assertEquals
5+
import org.junit.Test
6+
7+
class KotlinObjectMapperFactoryTest {
8+
@Test
9+
fun `test jackson 2 9 0`() {
10+
assertEquals(PackageVersion.VERSION.toString(), "2.9.0")
11+
KotlinObjectMapperFactory.new()
12+
}
13+
}

0 commit comments

Comments
 (0)