change publishing properties name

This commit is contained in:
Alexander Nozik 2021-03-07 09:22:48 +03:00
parent fd046394a4
commit eacdb132ed
2 changed files with 6 additions and 5 deletions

View File

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Publishing repositories are explicit and defined in the top level project
- Paths to publishing properties now use dot notation like `publishing.github.user`
### Deprecated
- Publishing plugin

View File

@ -38,7 +38,7 @@ dependencies {
implementation("org.jetbrains.kotlinx:binary-compatibility-validator:0.4.0")
}
project.extensions.findByType<GradlePluginDevelopmentExtension>()?.apply{
project.extensions.findByType<GradlePluginDevelopmentExtension>()?.apply {
plugins {
create("common") {
id = "ru.mipt.npm.gradle.common"
@ -141,8 +141,8 @@ afterEvaluate {
}
val spaceRepo: String = "https://maven.pkg.jetbrains.space/mipt-npm/p/mipt-npm/maven"
val spaceUser: String? by project
val spaceToken: String? by project
val spaceUser: String? = project.findProperty("publishing.space.user") as? String
val spaceToken: String? = project.findProperty("publishing.space.token") as? String
if (spaceUser != null && spaceToken != null) {
project.logger.info("Adding mipt-npm Space publishing to project [${project.name}]")
@ -159,8 +159,8 @@ afterEvaluate {
}
}
val sonatypeUser: String? by project
val sonatypePassword: String? by project
val sonatypeUser: String? = project.findProperty("publishing.sonatype.user") as? String
val sonatypePassword: String? = project.findProperty("publishing.sonatype.password") as? String
if (sonatypeUser != null && sonatypePassword != null) {
val sonatypeRepo: String = if (project.version.toString().contains("dev")) {