Commits

David Carr committed 9127ffb

build: only treat lack of bintray credentials as an error if we're actually trying to upload

  • Participants
  • Parent commits 6656a3c

Comments (0)

Files changed (1)

File gradle/maven.gradle

             try {
                 authentication(userName: bintrayUserName, password: bintrayApiKey)
             } catch (MissingPropertyException ex) {
-                throw new InvalidUserDataException("Uploading to Bintray requires authentication.  Please configure the credentials with 'bintrayUserName' and 'bintrayApiKey' properties in your gradle.properties file.")
+                if (gradle.taskGraph.hasTask('uploadArchives')) {
+                    throw new InvalidUserDataException("Uploading to Bintray requires authentication.  Please configure the credentials with 'bintrayUserName' and 'bintrayApiKey' properties in your gradle.properties file.")
+                }
             }
         }