Skip to content

Commit

Permalink
Merge pull request #55 from hexagonkt/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
jaguililla authored Dec 30, 2023
2 parents 52f369b + 57a1017 commit 7d79223
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import org.gradle.api.tasks.wrapper.Wrapper.DistributionType.ALL
*/

plugins {
kotlin("jvm") version("1.9.20") apply(false)
kotlin("jvm") version("1.9.22") apply(false)

id("idea")
id("eclipse")
id("org.jetbrains.dokka") version("1.9.10")
id("org.graalvm.buildtools.native") version("0.9.28") apply(false)
id("io.gitlab.arturbosch.detekt") version("1.23.3") apply(false)
id("io.gitlab.arturbosch.detekt") version("1.23.4") apply(false)
}

ext.set("gradleScripts", "https://raw.githubusercontent.com/hexagonkt/hexagon/$version/gradle")
Expand Down Expand Up @@ -69,6 +69,6 @@ task("release") {
}

tasks.wrapper {
gradleVersion = "8.4"
gradleVersion = "8.5"
distributionType = ALL
}
3 changes: 2 additions & 1 deletion dokka_json/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ description = "."
dependencies {
val dokkaVersion = properties["dokkaVersion"]

"api"("com.hexagonkt:serialization_jackson_json:$version")
"api"("com.hexagonkt:core:$version")
"api"("com.fasterxml.jackson.core:jackson-databind:2.15.3")
"api"("org.jetbrains.dokka:dokka-base:$dokkaVersion")
"compileOnly"("org.jetbrains.dokka:dokka-core:$dokkaVersion")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.hexagonkt.dokka.json

import com.fasterxml.jackson.databind.ObjectMapper
import com.hexagonkt.core.filterNotEmptyRecursive
import com.hexagonkt.serialization.jackson.json.Json
import com.hexagonkt.serialization.serialize
import org.jetbrains.dokka.CoreExtensions
import org.jetbrains.dokka.model.*
import org.jetbrains.dokka.model.doc.*
Expand All @@ -26,6 +25,8 @@ class JsonPlugin : DokkaPlugin() {
}
}

private val mapper: ObjectMapper = ObjectMapper()

private fun processModule(module: DModule, context: DokkaContext): DModule =
module.apply {
val name = module.name
Expand All @@ -47,7 +48,7 @@ class JsonPlugin : DokkaPlugin() {
"packages" to packages
)

file.writeText(map.filterNotEmptyRecursive().serialize(Json))
mapper.writeValue(file.writer(), map.filterNotEmptyRecursive())
}

private fun processPackage(pack: DPackage): Map<String, *> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.hexagonkt.dokka.json

import com.fasterxml.jackson.databind.ObjectMapper
import com.hexagonkt.core.requirePath
import com.hexagonkt.serialization.SerializationManager
import com.hexagonkt.serialization.jackson.json.Json
import com.hexagonkt.serialization.parseMap
import org.jetbrains.dokka.base.testApi.testRunner.BaseAbstractTest
import kotlin.test.Test
import org.junit.jupiter.api.condition.EnabledOnOs
Expand Down Expand Up @@ -69,8 +67,8 @@ class JsonPluginTest : BaseAbstractTest() {
}
}

SerializationManager.defaultFormat = Json
val json = File("build/dokka").resolve("module_mod.json").parseMap()
val mapper = ObjectMapper()
val json = mapper.readValue(File("build/dokka").resolve("module_mod.json"), Map::class.java)
assertEquals("mod", json.requirePath("name"))
}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ org.gradle.console=plain

# Gradle
# Version synchronized with Hexagon release (master)
version=3.4.1
version=3.4.6
group=com.hexagonkt.extra
description=The atoms of your platform

Expand All @@ -19,14 +19,14 @@ siteHost=https://hexagonkt.com

# VERSIONS
dokkaVersion=1.9.10
testcontainersVersion=1.19.1
dockerJavaVersion=3.3.3
testcontainersVersion=1.19.3
dockerJavaVersion=3.3.4

# scheduler
cronutilsVersion=9.2.1

# store_mongodb
mongodbVersion=4.11.0
mongodbVersion=4.11.1

# models
jakartaMailVersion=2.0.1
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.hexagonkt.core.text.Ansi.CSI

/**
* See https://github.com/kovidgoyal/kitty/commit/6777e2199e7b0ed011b2888ce94ad6abab3a5ced
* TODO https://sw.kovidgoyal.net/kitty/pointer-shapes/#
*/
object AnsiMouse {
const val ENABLE: String = "${CSI}?1003h"
Expand Down

0 comments on commit 7d79223

Please sign in to comment.