Skip to content

Commit

Permalink
try if-else in subprojects
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Feb 10, 2025
1 parent d38148c commit 48f4a66
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ println "CODEARTIFACT_DOWNLOAD_URL value"
println System.getenv("CODEARTIFACT_DOWNLOAD_URL")
println "RELEASE_BRANCH_NAME value"
println System.getenv("RELEASE_BRANCH_NAME")
if (System.env.CI != null && System.getenv("RELEASE_BRANCH_NAME") != "true") {
if (System.env.CI != null && System.getenv("RELEASE_BRANCH_NAME") == "false") {
//if (System.env.CI != null && System.getenv("CODEARTIFACT_DOWNLOAD_URL") ?: "" != "") {
println("im here...")
println("im here 1...")

apply from: 'teamcity-repository.gradle'
}
Expand All @@ -37,7 +37,8 @@ repositories {
/*maven { // this contains the neo4j 4.0.0-beta jars
url "https://neo4j.bintray.com/community/"
}*/
if (System.getenv("CODEARTIFACT_DOWNLOAD_URL") ?: "" != "") {
if (System.getenv("RELEASE_BRANCH_NAME") == "false" && (System.getenv("CODEARTIFACT_DOWNLOAD_URL") ?: "" != "")) {
println("im here 2...")
maven {
url System.getenv('CODEARTIFACT_DOWNLOAD_URL')
credentials {
Expand All @@ -62,17 +63,18 @@ subprojects {
/*maven { // this contains the neo4j 4.0.0-beta jars
url "https://neo4j.bintray.com/community/"
}*/
if (System.getenv("CODEARTIFACT_DOWNLOAD_URL") ?: "" != "") {
if (System.getenv("RELEASE_BRANCH_NAME") == "false" && (System.getenv("CODEARTIFACT_DOWNLOAD_URL") ?: "" != "")) {
println("im here 3...")
maven {
url System.getenv('CODEARTIFACT_DOWNLOAD_URL')
credentials {
username System.getenv('CODEARTIFACT_USERNAME')
password System.getenv('CODEARTIFACT_TOKEN')
}
}
} else {
mavenCentral()
}
mavenCentral()

maven {
url "https://repo.gradle.org/gradle/libs-releases"
}
Expand Down

0 comments on commit 48f4a66

Please sign in to comment.