Skip to content

Commit

Permalink
Fix artifactory configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerbenson committed Sep 7, 2017
1 parent 410adb7 commit 1bfc5e8
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions gradle/publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,25 @@ artifactoryPublish { task ->
}

artifactory {
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.hasTask(artifactoryPublish)) {
// trigger error if missing
bintrayUser
bintrayApiKey
}
}

publish {
contextUrl = forceLocal ? 'http://localhost:8080/artifactory' : 'https://oss.jfrog.org'
repository {
if (forceLocal)
repoKey = isSnapshot ? 'libs-snapshot-local' : 'libs-release-local'
else
repoKey = isSnapshot ? 'oss-snapshot-local' : 'oss-release-local'
gradle.taskGraph.whenReady { taskGraph ->
artifactoryPublish { task ->
if (taskGraph.hasTask(task)) {
username = bintrayUser
password = bintrayApiKey
}
}

if (project.hasProperty("bintrayUser") && project.hasProperty("bintrayApiKey")) {
username = bintrayUser
password = bintrayApiKey
}
}
defaults {
Expand Down

0 comments on commit 1bfc5e8

Please sign in to comment.