Update dependencies. Make optional configuraion for sonatype repo

This commit is contained in:
Alexander Nozik 2023-04-05 13:55:32 +03:00
parent 9fc8d96e88
commit 512954b510
3 changed files with 17 additions and 14 deletions

View File

@ -1,11 +1,11 @@
[versions] [versions]
tools = "0.14.5-kotlin-1.8.20-RC" tools = "0.14.6-kotlin-1.8.20"
kotlin = "1.8.20-RC" kotlin = "1.8.20"
atomicfu = "0.19.0" atomicfu = "0.20.0"
binary-compatibility-validator = "0.12.1" binary-compatibility-validator = "0.13.0"
changelog = "2.0.0" changelog = "2.0.0"
dokka = "1.8.10" dokka = "1.8.10"
kotlin-jupyter = "0.11.0-317" kotlin-jupyter = "0.11.0-349"
kotlinx-benchmark = "0.4.7" kotlinx-benchmark = "0.4.7"
kotlinx-cli = "0.3.5" kotlinx-cli = "0.3.5"
kotlinx-coroutines = "1.6.4" kotlinx-coroutines = "1.6.4"
@ -13,14 +13,15 @@ kotlinx-datetime = "0.4.0"
kotlinx-html = "0.8.0" kotlinx-html = "0.8.0"
kotlinx-knit = "0.4.0" kotlinx-knit = "0.4.0"
kotlinx-nodejs = "0.0.7" kotlinx-nodejs = "0.0.7"
#old version due to xml inclompatibility
kotlinx-serialization = "1.4.1" kotlinx-serialization = "1.4.1"
ktor = "2.2.3" ktor = "2.2.4"
xmlutil = "0.84.3" xmlutil = "0.84.3"
yamlkt = "0.12.0" yamlkt = "0.12.0"
jsBom = "1.0.0-pre.509" jsBom = "1.0.0-pre.530"
junit = "5.9.2" junit = "5.9.2"
compose = "1.3.0" compose = "1.3.0"
logback = "1.4.5" logback = "1.4.6"
[libraries] [libraries]
atomicfu-gradle = { module = "org.jetbrains.kotlinx:atomicfu-gradle-plugin", version.ref = "atomicfu" } 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-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-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" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines" }

View File

@ -88,9 +88,9 @@ public class KSciencePublishingExtension(public val project: Project) {
* *
* @param addToRelease publish packages in the `release` task to the Sonatype repository. * @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" } require(isVcsInitialized) { "The project vcs is not set up use 'pom' method to do so" }
project.addSonatypePublishing() project.addSonatypePublishing(sonatypeRoot)
} }
} }

View File

@ -171,7 +171,7 @@ internal fun Project.addSpacePublishing(spaceRepo: String) {
} }
} }
internal fun Project.addSonatypePublishing() { internal fun Project.addSonatypePublishing(sonatypeRoot: String) {
if (isInDevelopment) { if (isInDevelopment) {
logger.info("Sonatype publishing skipped for development version") logger.info("Sonatype publishing skipped for development version")
return return
@ -189,7 +189,7 @@ internal fun Project.addSonatypePublishing() {
plugins.withId("maven-publish") { plugins.withId("maven-publish") {
configure<PublishingExtension> { configure<PublishingExtension> {
repositories.maven { repositories.maven {
val sonatypeRepo = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2" val sonatypeRepo = "$sonatypeRoot/service/local/staging/deploy/maven2"
name = "sonatype" name = "sonatype"
url = uri(sonatypeRepo) url = uri(sonatypeRepo)