diff --git a/akkurate-ktor-client/build.gradle.kts b/akkurate-ktor-client/build.gradle.kts index 3df32bd..6f507f1 100644 --- a/akkurate-ktor-client/build.gradle.kts +++ b/akkurate-ktor-client/build.gradle.kts @@ -1,15 +1,15 @@ -import dev.nesk.akkurate.gradle.IgnoredTarget -import dev.nesk.akkurate.gradle.configureTargets - plugins { - id("akkurate.kmp-library-conventions") + id("akkurate.component.kmp-library") + id("akkurate.feature.publishing") id("org.jetbrains.dokka") - alias(libs.plugins.kotlinx.serialization) + kotlin("plugin.serialization") } -kotlin { - configureTargets(IgnoredTarget.WASM_WASI) +kmpLibrary { + ignoreTargets { wasmWasi() } +} +kotlin { sourceSets { commonMain.dependencies { api(project(":akkurate-core")) diff --git a/akkurate-ktor-server/build.gradle.kts b/akkurate-ktor-server/build.gradle.kts index 35ee964..d5d8d7b 100644 --- a/akkurate-ktor-server/build.gradle.kts +++ b/akkurate-ktor-server/build.gradle.kts @@ -1,15 +1,15 @@ -import dev.nesk.akkurate.gradle.IgnoredTarget -import dev.nesk.akkurate.gradle.configureTargets - plugins { - id("akkurate.kmp-library-conventions") + id("akkurate.component.kmp-library") + id("akkurate.feature.publishing") id("org.jetbrains.dokka") - alias(libs.plugins.kotlinx.serialization) + kotlin("plugin.serialization") } -kotlin { - configureTargets(IgnoredTarget.WASM_WASI) +kmpLibrary { + ignoreTargets { wasmWasi() } +} +kotlin { sourceSets { commonMain.dependencies { api(project(":akkurate-core")) diff --git a/examples/ktor-server/build.gradle.kts b/examples/ktor-server/build.gradle.kts index faa760a..cadd976 100755 --- a/examples/ktor-server/build.gradle.kts +++ b/examples/ktor-server/build.gradle.kts @@ -18,7 +18,7 @@ dependencies { implementation(libs.exposed.jdbc) implementation(libs.h2) implementation(libs.logback) - testImplementation(libs.ktor.server.tests.jvm) + testImplementation(libs.ktor.server.test) testImplementation(libs.kotlin.test.junit) implementation(project(":akkurate-core")) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 9ff7d16..e9c5143 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -9,14 +9,16 @@ kotlin-symbolProcessing = "2.0.21-1.0.28" kotlinx-coroutines = "1.9.0" # https://github.com/Kotlin/kotlinx-datetime/releases kotlinx-datetime = "0.6.1" +# https://github.com/Kotlin/kotlinx.serialization/releases +kotlinx-serialization = "1.7.3" # https://github.com/ktorio/ktor/releases -ktor = "2.3.7" +ktor = "3.0.0" # https://logback.qos.ch/news.html -logback = "1.4.12" +logback = "1.4.14" # https://github.com/JetBrains/Exposed/releases -exposed = "0.41.1" +exposed = "0.56.0" # https://github.com/h2database/h2database/releases -h2 = "2.2.222" +h2 = "2.3.232" # https://github.com/arrow-kt/arrow/releases arrow = "1.2.0" # https://github.com/Kotlin/dokka/releases @@ -27,8 +29,10 @@ kotlinpoet = "1.14.2" kotlinCompileTesting = "1.5.0" # https://github.com/pedrovgs/KotlinSnapshot/releases kotlinSnapshot = "2.3.0" -# https://github.com/radarsh/gradle-test-logger-plugin +# https://github.com/radarsh/gradle-test-logger-plugin/releases testLogger = "3.2.0" +# https://github.com/mockk/mockk/releases +mockk = "1.13.13" [libraries] kotlin-test-junit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin-language" } @@ -39,6 +43,8 @@ kotlin-symbolProcessing-plugin = { group = "com.google.devtools.ksp", name = "sy kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinx-datetime" } kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinx-coroutines" } +kotlinx-serialization-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-core", version.ref = "kotlinx-serialization" } + kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinx-serialization" } kotlinpoet-core = { group = "com.squareup", name = "kotlinpoet", version.ref = "kotlinpoet" } kotlinpoet-ksp = { group = "com.squareup", name = "kotlinpoet-ksp", version.ref = "kotlinpoet" } @@ -46,14 +52,18 @@ kotlinpoet-ksp = { group = "com.squareup", name = "kotlinpoet-ksp", version.ref arrow-core = { group = "io.arrow-kt", name = "arrow-core", version.ref = "arrow" } ktor-server-core-jvm = { group = "io.ktor", name = "ktor-server-core-jvm", version.ref = "ktor" } -ktor-server-content-negotiation-jvm = { group = "io.ktor", name = "ktor-server-content-negotiation-jvm", version.ref = "ktor" } -ktor-serialization-kotlinx-json-jvm = { group = "io.ktor", name = "ktor-serialization-kotlinx-json-jvm", version.ref = "ktor" } +ktor-server-contentNegotiation-jvm = { group = "io.ktor", name = "ktor-server-content-negotiation-jvm", version.ref = "ktor" } +ktor-server-contentNegotiation = { group = "io.ktor", name = "ktor-server-content-negotiation", version.ref = "ktor" } +ktor-serialization-json-jvm = { group = "io.ktor", name = "ktor-serialization-kotlinx-json-jvm", version.ref = "ktor" } +ktor-serialization-json = { group = "io.ktor", name = "ktor-serialization-kotlinx-json", version.ref = "ktor" } ktor-server-host-common-jvm = { group = "io.ktor", name = "ktor-server-host-common-jvm", version.ref = "ktor" } ktor-server-status-pages-jvm = { group = "io.ktor", name = "ktor-server-status-pages-jvm", version.ref = "ktor" } -ktor-server-tests-jvm = { group = "io.ktor", name = "ktor-server-tests-jvm", version.ref = "ktor" } +ktor-server-test = { group = "io.ktor", name = "ktor-server-test-host", version.ref = "ktor" } ktor-server-netty-jvm = { group = "io.ktor", name = "ktor-server-netty-jvm", version.ref = "ktor" } -ktor-server-request-validation = { group = "io.ktor", name = "ktor-server-request-validation", version.ref = "ktor" } +ktor-server-requestValidation = { group = "io.ktor", name = "ktor-server-request-validation", version.ref = "ktor" } ktor-plugin = { group = "io.ktor.plugin", name = "io.ktor.plugin.gradle.plugin", version.ref = "ktor" } +ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" } +ktor-client-contentNegotiation = { group = "io.ktor", name = "ktor-client-content-negotiation", version.ref = "ktor" } dokka-plugin = { group = "org.jetbrains.dokka", name = "dokka-gradle-plugin", version.ref = "dokka" } kotlinCompileTesting-ksp = { group = "com.github.tschuchortdev", name = "kotlin-compile-testing-ksp", version.ref = "kotlinCompileTesting" } @@ -63,14 +73,15 @@ exposed-jdbc = { group = "org.jetbrains.exposed", name = "exposed-jdbc", version h2 = { group = "com.h2database", name = "h2", version.ref = "h2" } logback = { group = "ch.qos.logback", name = "logback-classic", version.ref = "logback" } testLogger-plugin = { group = "com.adarshr", name = "gradle-test-logger-plugin", version.ref = "testLogger" } +mockk = { group = "io.mockk", name = "mockk", version.ref = "mockk" } [bundles] ktor-server = [ "ktor-server-core-jvm", - "ktor-server-content-negotiation-jvm", - "ktor-serialization-kotlinx-json-jvm", + "ktor-server-contentNegotiation-jvm", + "ktor-serialization-json-jvm", "ktor-server-host-common-jvm", "ktor-server-status-pages-jvm", "ktor-server-netty-jvm", - "ktor-server-request-validation", + "ktor-server-requestValidation", ] \ No newline at end of file