fix of publishing scripts

This commit is contained in:
2025-06-30 18:02:47 +06:00
parent 92651d3ba6
commit 7a2d070ee3
2 changed files with 13 additions and 1 deletions

View File

@@ -1,3 +1,4 @@
apply plugin: 'maven-publish'
task javadocsJar(type: Jar) {
@@ -52,6 +53,17 @@ publishing {
}
}
}
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
maven {
name = "sonatype"
url = uri("https://ossrh-staging-api.central.sonatype.com/service/local/staging/deploy/maven2/")
credentials {
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
}
}
}
}
}