Skip to content

Commit f207c1b

Browse files
committed
Add jackson 2.9.0 and 2.14.2 tests
1 parent 5ccb859 commit f207c1b

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'
@@ -42,3 +43,27 @@ task registerNamespace(type: JavaExec) {
4243

4344
test.dependsOn 'registerNamespace'
4445

46+
def jacksonVersions = ['2.9.0', "$jacksonVersion".toString()]
47+
48+
testing {
49+
suites {
50+
jacksonVersions.forEach { jacksonVersion ->
51+
"jackson${jacksonVersion}Test"(JvmTestSuite) {
52+
useJUnit(junitVersion)
53+
dependencies {
54+
implementation project()
55+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion!!"
56+
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion!!"
57+
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:$jacksonVersion!!") {
58+
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-reflect'
59+
}
60+
61+
implementation project(':temporal-testing')
62+
implementation "junit:junit:${junitVersion}"
63+
}
64+
}
65+
}
66+
}
67+
}
68+
69+
test.dependsOn("jackson2.9.0Test", "jackson2.14.2Test")
Lines changed: 13 additions & 0 deletions
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+
}
Lines changed: 13 additions & 0 deletions
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)