Update build.gradle

This commit is contained in:
2025-05-23 17:44:22 +03:00
parent 53c72731ec
commit 0cb0312aae

View File

@ -114,6 +114,35 @@ task buildRelease(type: GradleBuild) {
tasks = ['clean', 'writeVersion', 'nbackup', 'build', 'copyDist', 'publish']
}
publishing {
repositories {
maven {
def isRepoCredetionals = project.hasProperty('biz.redsoft.repo.user') && project.hasProperty('biz.redsoft.repo.password')
def isCredentialsInsideBuildScript = project.credentials.user != null && project.credentials.password != null
println(isRepoCredetionals ? "Using repoCredentials for publish..." :
isCredentialsInsideBuildScript ? "Using buildScript credentials for publish..." : "Credentials are not presented!!!")
if (isRepoCredetionals) {
credentials {
username project.'biz.redsoft.repo.user'
password project.'biz.redsoft.repo.password'
}
} else if (isCredentialsInsideBuildScript) {
credentials {
username project.credentials.user
password project.credentials.password
}
}
def suffix = project.findProperty('biz.redsoft.release') ? 'releases' : 'snapshots'
url "https://ncore-repo.red-soft.ru/repository/${suffix}"
}
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}
jar{
manifest{