diff --git a/build.gradle.kts b/build.gradle.kts index 116e14c..237100e 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -140,23 +140,64 @@ publishing { } } - val sonatypeUser: String? by project - val sonatypePassword: String? by project + val spaceRepo: String = "https://maven.pkg.jetbrains.space/mipt-npm/p/mipt-npm/maven" + val spaceUser: String? by project + val spaceToken: String? by project - if (sonatypeUser != null && sonatypePassword != null) { - nexusPublishing { - repositories { - sonatype { - username.set(sonatypeUser) - password.set(sonatypePassword) + if (spaceUser != null && spaceToken != null) { + project.logger.info("Adding mipt-npm Space publishing to project [${project.name}]") + repositories { + maven { + name = "space" + url = uri(spaceRepo) + credentials { + username = spaceUser + password = spaceToken } + } } } - signing { - useGpgCmd() - sign(publications) + val sonatypeUser: String? by project + val sonatypePassword: String? by project + +// if (sonatypeUser != null && sonatypePassword != null) { +// nexusPublishing { +// repositories { +// sonatype { +// username.set(sonatypeUser) +// password.set(sonatypePassword) +// } +// } +// } +// } + + if (sonatypeUser != null && sonatypePassword != null) { + val sonatypeRepo: String = if (project.version.toString().contains("dev")) { + "https://oss.sonatype.org/content/repositories/snapshots" + } else { + "https://oss.sonatype.org/service/local/staging/deploy/maven2" + } + + if (plugins.findPlugin("signing") == null) { + plugins.apply("signing") + } + + repositories { + maven { + name = "sonatype" + url = uri(sonatypeRepo) + credentials { + username = sonatypeUser + password = sonatypePassword + } + } + } + signing { + useGpgCmd() + sign(publications) + } } } diff --git a/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt b/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt index e867cce..a494578 100644 --- a/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt +++ b/src/main/kotlin/ru/mipt/npm/gradle/KScienceVersions.kt @@ -9,7 +9,7 @@ object KScienceVersions { const val kotlinVersion = "1.4.30" const val kotlinxNodeVersion = "0.0.7" const val coroutinesVersion = "1.4.2" - const val serializationVersion = "1.1.0-RC" + const val serializationVersion = "1.1.0" const val atomicVersion = "0.15.1" const val ktorVersion = "1.5.1" const val htmlVersion = "0.7.2" @@ -17,7 +17,7 @@ object KScienceVersions { val JVM_TARGET = JavaVersion.VERSION_11 object Serialization{ - const val xmlVersion = "0.80.1" + const val xmlVersion = "0.81.0" const val bsonVersion = "0.4.4" const val yamlKtVersion = "0.9.0" }