File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -76,20 +76,25 @@ artifactoryPublish { task ->
7676}
7777
7878artifactory {
79+ gradle. taskGraph. whenReady { taskGraph ->
80+ if (taskGraph. hasTask(artifactoryPublish)) {
81+ // trigger error if missing
82+ bintrayUser
83+ bintrayApiKey
84+ }
85+ }
86+
7987 publish {
8088 contextUrl = forceLocal ? ' http://localhost:8080/artifactory' : ' https://oss.jfrog.org'
8189 repository {
8290 if (forceLocal)
8391 repoKey = isSnapshot ? ' libs-snapshot-local' : ' libs-release-local'
8492 else
8593 repoKey = isSnapshot ? ' oss-snapshot-local' : ' oss-release-local'
86- gradle. taskGraph. whenReady { taskGraph ->
87- artifactoryPublish { task ->
88- if (taskGraph. hasTask(task)) {
89- username = bintrayUser
90- password = bintrayApiKey
91- }
92- }
94+
95+ if (project. hasProperty(" bintrayUser" ) && project. hasProperty(" bintrayApiKey" )) {
96+ username = bintrayUser
97+ password = bintrayApiKey
9398 }
9499 }
95100 defaults {
You can’t perform that action at this time.
0 commit comments