implement versions platform, tidy up and bump some dependencies

This commit is contained in:
Adam 2022-05-01 09:41:49 +02:00
parent bc6574bb7e
commit a78ffb794a
8 changed files with 101 additions and 54 deletions

View file

@ -10,16 +10,24 @@ kotlin = "1.6.21"
## libs ## ## libs ##
camel-kafkaConnectors = "0.11.0" camel-kafkaConnectors = "0.11.0"
http4k = "4.19.1.0" http4k = "4.25.12.0"
kafka = "3.1.0" kafka = "3.1.0"
kotlinx-serialization = "1.3.2"
kvision = "5.9.0" kvision = "5.9.0"
log4j2 = "2.17.2" log4j2 = "2.17.2"
qosLogback = "1.2.11" qosLogback = "1.2.11"
slf4j = "1.7.36" slf4j = "1.7.36"
okio = "3.1.0" okio = "3.1.0"
scrimage = "4.0.31"
kotlinx-serialization = "1.3.2"
kxs-yaml = "0.43.0"
kotlinJsWrappers = "0.0.1-pre.331-kotlin-1.6.20" kotlinJsWrappers = "0.0.1-pre.331-kotlin-1.6.20"
kotlinx-html = "0.7.5"
kotlinx-nodejs = "0.0.7"
kotlinx-coroutines = "1.6.1"
ktor = "2.0.1"
## test ## ## test ##
@ -52,20 +60,20 @@ dependencyCheck = { id = "com.github.ben-manes.versions", vers
## kotlin ## ## kotlin ##
kotlin-bom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlin" } kotlin-bom = { group = "org.jetbrains.kotlin", name = "kotlin-bom", version.ref = "kotlin" }
kotlinx-serialization-bom = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-bom", version.ref = "kotlinx-serialization" } kotlinx-serialization-bom = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-bom", version.ref = "kotlinx-serialization" }
kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core" } kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json" } kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json" }
kotlinx-serialization-protobuf = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-protobuf" } kotlinx-serialization-protobuf = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-protobuf" }
kotlinx-serialization-yaml = { group = "com.charleskorn.kaml", name = "kaml", version = "0.37.0" } kotlinx-serialization-yaml = { group = "com.charleskorn.kaml", name = "kaml", version.ref = "kxs-yaml" }
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.6.1" } kotlinx-coroutines-bom = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-bom", version.ref = "kotlinx-coroutines" }
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core" }
kotlinx-html = { group = "org.jetbrains.kotlinx", name = "kotlinx-html", version = "0.7.5" } kotlinx-html = { group = "org.jetbrains.kotlinx", name = "kotlinx-html", version.ref = "kotlinx-html" }
kotlinx-nodejs = { group = "org.jetbrains.kotlinx", name = "kotlinx-nodejs", version = "0.0.7" } kotlinx-nodejs = { group = "org.jetbrains.kotlinx", name = "kotlinx-nodejs", version.ref = "kotlinx-nodejs" }
kotlin-jsWrappers-bom = { group = "org.jetbrains.kotlin-wrappers", name = "kotlin-wrappers-bom", version.ref = "kotlinJsWrappers" }
kotlin-jsWrappers-bom = { group = "org.jetbrains.kotlin-wrappers", name = "kotlin-wrappers-bom", version.ref = "kotlinJsWrappers" }
## http4k ## ## http4k ##
http4k-bom = { group = "org.http4k", name = "http4k-bom", version.ref = "http4k" } http4k-bom = { group = "org.http4k", name = "http4k-bom", version.ref = "http4k" }
@ -81,6 +89,11 @@ http4k-format-yaml = { group = "org.http4k", name = "http4k-format-jackson-y
http4k-format-kotlinx = { group = "org.http4k", name = "http4k-format-kotlinx-serialization" } http4k-format-kotlinx = { group = "org.http4k", name = "http4k-format-kotlinx-serialization" }
http4k-graphql = { group = "org.http4k", name = "http4k-graphql" } http4k-graphql = { group = "org.http4k", name = "http4k-graphql" }
## ktor ##
ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" }
### jackson ## ### jackson ##
#jackson-bom = { group = " com.fasterxml.jackson.module", name = ":jackson-module-kotlin", version = "2.13.+" } #jackson-bom = { group = " com.fasterxml.jackson.module", name = ":jackson-module-kotlin", version = "2.13.+" }
#jackson-kotlin = { group = " com.fasterxml.jackson.module", name = ":jackson-module-kotlin", version = "2.13.+" } #jackson-kotlin = { group = " com.fasterxml.jackson.module", name = ":jackson-module-kotlin", version = "2.13.+" }
@ -106,10 +119,10 @@ kafka-streamsTestUtils = { group = "org.apache.kafka", name = "kafka-streams-tes
kafka-kotkaStreams = { group = "com.github.adamko-dev.kotka-streams", name = "kotka-streams", version = "v22.04.24" } kafka-kotkaStreams = { group = "com.github.adamko-dev.kotka-streams", name = "kotka-streams", version = "v22.04.24" }
jsoup = { group = "org.jsoup", name = "jsoup", version = "1.14.3" } jsoup = { group = "org.jsoup", name = "jsoup", version = "1.14.3" }
skrapeit = { group = "it.skrape", name = "skrapeit", version = "1.2.0" } skrapeit = { group = "it.skrape", name = "skrapeit", version = "1.2.0" }
scrimage-core = { group = "com.sksamuel.scrimage", name = "scrimage-core", version = "4.0.31" } scrimage-core = { group = "com.sksamuel.scrimage", name = "scrimage-core", version.ref = "scrimage" }
## okio ## ## okio ##
@ -125,9 +138,9 @@ mockk = { group = "io.mockk", name = "mockk", version = "1.12.3" }
## junit ## ## junit ##
junit-bom = { group = "org.junit", name = "junit-bom", version.ref = "junit" } junit-bom = { group = "org.junit", name = "junit-bom", version.ref = "junit" }
junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api", version.ref = "junit" } junit-api = { group = "org.junit.jupiter", name = "junit-jupiter-api" } # version.ref = "junit" }
junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine", version.ref = "junit" } junit-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engine" } # version.ref = "junit" }
junit-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version = "1.7.2" } junit-launcher = { group = "org.junit.platform", name = "junit-platform-launcher" } # version = "1.7.2" }
## kotest ## ## kotest ##
kotest-bom = { group = "io.kotest", name = "kotest-bom", version.ref = "kotest" } kotest-bom = { group = "io.kotest", name = "kotest-bom", version.ref = "kotest" }

View file

@ -18,6 +18,7 @@ val projectId: String by project.extra
val kafkaStateDir = layout.projectDirectory.dir("kafka-state") val kafkaStateDir = layout.projectDirectory.dir("kafka-state")
dependencies { dependencies {
implementation(platform(projects.modules.versionsPlatform))
implementation(libs.kafka.streams) implementation(libs.kafka.streams)
testImplementation(libs.kafka.streamsTestUtils) testImplementation(libs.kafka.streamsTestUtils)
@ -26,14 +27,12 @@ dependencies {
// implementation("com.ionspin.kotlin:bignum:0.3.3") // implementation("com.ionspin.kotlin:bignum:0.3.3")
implementation(platform(libs.kotlinx.serialization.bom))
implementation(libs.kotlinx.serialization.core) implementation(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.serialization.json) implementation(libs.kotlinx.serialization.json)
// implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf") // implementation("org.jetbrains.kotlinx:kotlinx-serialization-protobuf")
implementation(libs.kotlinx.coroutines) implementation(libs.kotlinx.coroutines.core)
implementation(platform(libs.http4k.bom))
implementation(libs.bundles.http4k) implementation(libs.bundles.http4k)
implementation(libs.http4k.format.kotlinx) implementation(libs.http4k.format.kotlinx)
@ -41,7 +40,6 @@ dependencies {
implementation(libs.scrimage.core) implementation(libs.scrimage.core)
implementation(platform(libs.okio.bom))
implementation(libs.okio.core) implementation(libs.okio.core)
implementation(libs.kafka.kotkaStreams) { implementation(libs.kafka.kotkaStreams) {

View file

@ -8,16 +8,15 @@ plugins {
dependencies { dependencies {
implementation(platform(projects.modules.versionsPlatform))
implementation(projects.modules.eventsServer) implementation(projects.modules.eventsServer)
implementation(platform(libs.kotlinx.serialization.bom))
implementation(libs.kotlinx.serialization.core) implementation(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.serialization.json) implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.coroutines) implementation(libs.kotlinx.coroutines.core)
implementation(platform(libs.http4k.bom))
implementation(libs.bundles.http4k) implementation(libs.bundles.http4k)
implementation(libs.http4k.format.kotlinx) implementation(libs.http4k.format.kotlinx)

View file

@ -23,6 +23,8 @@ fun DependencyHandlerScope.kafkaConnector(
} }
dependencies { dependencies {
implementation(platform(projects.modules.versionsPlatform))
kotlin("reflect") kotlin("reflect")
kafkaConnector("camel-ahc-ws-kafka-connector") kafkaConnector("camel-ahc-ws-kafka-connector")
@ -30,12 +32,10 @@ dependencies {
implementation("com.github.adamko-dev:json5-kotlin:2.0.3") implementation("com.github.adamko-dev:json5-kotlin:2.0.3")
implementation(platform(libs.http4k.bom))
implementation(libs.bundles.http4k) implementation(libs.bundles.http4k)
implementation(platform(libs.kotlinx.serialization.bom)) implementation(libs.kotlinx.serialization.core)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core") implementation(libs.kotlinx.serialization.json)
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json")
} }
// disabled for now... // disabled for now...

View file

@ -2,16 +2,10 @@ plugins {
dev.adamko.kafkatorio.lang.`kotlin-jvm` dev.adamko.kafkatorio.lang.`kotlin-jvm`
} }
//group = "${rootProject.group}.server"
//version = rootProject.version
//
dependencies { dependencies {
implementation(platform(projects.modules.versionsPlatform))
implementation(enforcedPlatform(libs.kotlinx.serialization.bom)) implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.coroutines)
implementation("io.ktor:ktor-network:1.6.4")
implementation("io.ktor:ktor-network")
} }

View file

@ -0,0 +1,41 @@
plugins {
`java-platform`
}
javaPlatform {
allowDependencies()
}
dependencies {
api(platform(libs.kotlin.bom))
api(platform(libs.kotlinx.coroutines.bom))
api(platform(libs.kotlinx.serialization.bom))
api(platform(libs.http4k.bom))
api(platform(libs.okio.bom))
api(platform(libs.ktor.bom))
api(platform(libs.kotest.bom))
constraints {
api(libs.skrapeit)
api(libs.kotlinx.serialization.yaml)
api(libs.kafka.kotkaStreams)
api(libs.kafka.streams)
api(libs.okio.core)
api(libs.scrimage.core)
api(libs.kafka.streamsTestUtils)
}
}

View file

@ -1,4 +1,3 @@
import dev.adamko.kafkatorio.gradle.yarn
import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler import org.jetbrains.kotlin.gradle.plugin.KotlinDependencyHandler
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
@ -66,15 +65,16 @@ kotlin {
kvision("kvision-redux") kvision("kvision-redux")
kvision("kvision-state-flow") kvision("kvision-state-flow")
implementation(libs.kotlinx.coroutines) implementation(dependencies.platform(libs.kotlinx.coroutines.bom))
implementation(dependencies.platform(libs.kotlin.jsWrappers.bom)) implementation(dependencies.platform(libs.kotlin.jsWrappers.bom))
// implementation(dependencies.platform(npm("follow-redirects", "^1.14.8"))) implementation(libs.kotlinx.coroutines.core)
// implementation(dependencies.platform(npm("nanoid", "^3.1.31")))
// implementation(dependencies.platform(npm("minimist", "^1.2.6"))) implementation(dependencies.platform(npm("follow-redirects", "^1.14.8")))
// implementation(dependencies.platform(npm("async", "^2.6.4"))) implementation(dependencies.platform(npm("nanoid", "^3.1.31")))
// implementation(dependencies.platform(npm("node-forge", "^1.3.0"))) implementation(dependencies.platform(npm("minimist", "^1.2.6")))
implementation(dependencies.platform(npm("async", "^2.6.4")))
implementation(dependencies.platform(npm("node-forge", "^1.3.0")))
} }
val webDir = file("src/main/web") val webDir = file("src/main/web")
@ -104,13 +104,13 @@ fun KotlinDependencyHandler.kvision(
} }
// https://youtrack.jetbrains.com/issue/KT-42420 // https://youtrack.jetbrains.com/issue/KT-42420
afterEvaluate { //afterEvaluate {
yarn { // yarn {
resolution("mocha", "9.2.2") // resolution("mocha", "9.2.2")
resolution("follow-redirects", "1.14.8") // resolution("follow-redirects", "1.14.8")
resolution("nanoid", "3.1.31") // resolution("nanoid", "3.1.31")
resolution("minimist", "1.2.6") // resolution("minimist", "1.2.6")
resolution("async", "2.6.4") // resolution("async", "2.6.4")
resolution("node-forge", "1.3.0") // resolution("node-forge", "1.3.0")
} // }
} //}

View file

@ -16,6 +16,8 @@ include(
":modules:web-map", ":modules:web-map",
":modules:factorio-mod-portal-client", ":modules:factorio-mod-portal-client",
":modules:versions-platform",
) )
enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS") enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")