From 512954b510af126120de64447c4945c6e3daad89 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 5 Apr 2023 13:55:32 +0300 Subject: [PATCH] Update dependencies. Make optional configuraion for sonatype repo --- gradle/libs.versions.toml | 23 +++++++++++-------- .../kscience/gradle/KScienceProjectPlugin.kt | 4 ++-- .../kscience/gradle/internal/publishing.kt | 4 ++-- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f3b90d2..b7baf37 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,11 +1,11 @@ [versions] -tools = "0.14.5-kotlin-1.8.20-RC" -kotlin = "1.8.20-RC" -atomicfu = "0.19.0" -binary-compatibility-validator = "0.12.1" +tools = "0.14.6-kotlin-1.8.20" +kotlin = "1.8.20" +atomicfu = "0.20.0" +binary-compatibility-validator = "0.13.0" changelog = "2.0.0" dokka = "1.8.10" -kotlin-jupyter = "0.11.0-317" +kotlin-jupyter = "0.11.0-349" kotlinx-benchmark = "0.4.7" kotlinx-cli = "0.3.5" kotlinx-coroutines = "1.6.4" @@ -13,14 +13,15 @@ kotlinx-datetime = "0.4.0" kotlinx-html = "0.8.0" kotlinx-knit = "0.4.0" kotlinx-nodejs = "0.0.7" +#old version due to xml inclompatibility kotlinx-serialization = "1.4.1" -ktor = "2.2.3" +ktor = "2.2.4" xmlutil = "0.84.3" yamlkt = "0.12.0" -jsBom = "1.0.0-pre.509" +jsBom = "1.0.0-pre.530" junit = "5.9.2" compose = "1.3.0" -logback = "1.4.5" +logback = "1.4.6" [libraries] atomicfu-gradle = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" } @@ -37,6 +38,8 @@ kotlin-serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", v kotlin-jupyter-gradle = { module = "org.jetbrains.kotlin:kotlin-jupyter-api-gradle-plugin", version.ref = "kotlin-jupyter" } +kotlin-js-wrappers = { module = "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:", version.ref = "jsBom" } + kotlinx-benchmark-runtime = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-runtime", version.ref = "kotlinx-benchmark" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" } @@ -79,13 +82,13 @@ xmlutil-serialization = { module = "io.github.pdvrieze.xmlutil:serialization", v yamlkt = { module = "net.mamoe.yamlkt:yamlkt", version.ref = "yamlkt" } -logback-classic = {module = "ch.qos.logback:logback-classic", version.ref = "logback"} +logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logback" } [plugins] changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" } dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" } -compose = {id = "org.jetbrains.compose", version.ref = "compose"} +compose = { id = "org.jetbrains.compose", version.ref = "compose" } gradle-common = { id = "space.kscience.gradle.common", version.ref = "tools" } gradle-project = { id = "space.kscience.gradle.project", version.ref = "tools" } diff --git a/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt b/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt index b979c69..2b73d9e 100644 --- a/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt +++ b/src/main/kotlin/space/kscience/gradle/KScienceProjectPlugin.kt @@ -88,9 +88,9 @@ public class KSciencePublishingExtension(public val project: Project) { * * @param addToRelease publish packages in the `release` task to the Sonatype repository. */ - public fun sonatype() { + public fun sonatype(sonatypeRoot: String = "https://s01.oss.sonatype.org") { require(isVcsInitialized) { "The project vcs is not set up use 'pom' method to do so" } - project.addSonatypePublishing() + project.addSonatypePublishing(sonatypeRoot) } } diff --git a/src/main/kotlin/space/kscience/gradle/internal/publishing.kt b/src/main/kotlin/space/kscience/gradle/internal/publishing.kt index 738e5f4..5eabab6 100644 --- a/src/main/kotlin/space/kscience/gradle/internal/publishing.kt +++ b/src/main/kotlin/space/kscience/gradle/internal/publishing.kt @@ -171,7 +171,7 @@ internal fun Project.addSpacePublishing(spaceRepo: String) { } } -internal fun Project.addSonatypePublishing() { +internal fun Project.addSonatypePublishing(sonatypeRoot: String) { if (isInDevelopment) { logger.info("Sonatype publishing skipped for development version") return @@ -189,7 +189,7 @@ internal fun Project.addSonatypePublishing() { plugins.withId("maven-publish") { configure { repositories.maven { - val sonatypeRepo = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" + val sonatypeRepo = "$sonatypeRoot/service/local/staging/deploy/maven2" name = "sonatype" url = uri(sonatypeRepo)