Update build.gradle
This commit is contained in:
29
build.gradle
29
build.gradle
@ -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{
|
||||
|
Reference in New Issue
Block a user