Skip to content

Commit

Permalink
update usage jackson kotlin module
Browse files Browse the repository at this point in the history
  • Loading branch information
codeniko committed Sep 22, 2022
1 parent 6673b76 commit 8c20f82
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
18 changes: 14 additions & 4 deletions publish.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
// apply plugin: 'maven'
apply plugin: 'signing'

def publishLocal = true

configurations {
archives {
extendsFrom configurations.default
}
}

task sourceJar(type: Jar) {
classifier "sources"
from sourceSets.main.allSource
Expand All @@ -10,6 +18,11 @@ artifacts {
archives jar, sourceJar
}

signing {
required { !snapshotVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand All @@ -33,6 +46,7 @@ publishing {
developer {
id = 'codeniko'
name = 'Nikolay Feldman'
url = 'https://www.nfeld.com'
}
}
scm {
Expand Down Expand Up @@ -105,7 +119,3 @@ if (!publishLocal) {
}
}

signing {
required { !snapshotVersion && gradle.taskGraph.hasTask("uploadArchives") }
sign configurations.archives
}
5 changes: 2 additions & 3 deletions src/main/kotlin/com/nfeld/jsonpathkt/util/JacksonUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ package com.nfeld.jsonpathkt.util

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.databind.SerializationFeature
import com.fasterxml.jackson.module.kotlin.KotlinModule
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper

object JacksonUtil {
val mapper: ObjectMapper by lazy {
ObjectMapper()
jacksonObjectMapper()
.configure(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS, true)
.registerModule(KotlinModule())
}
}

Expand Down

0 comments on commit 8c20f82

Please sign in to comment.