I have my Artifactory username and password declared in the build.gradle file in my HOME folder.
If I declare the artifactory block in my build.gradle file as follows:
This works and I am able to publish to Artifactory with the artfiactoryPublish Gradle task. I'd like to make the artifactory_username and artifactory_password Gradle properties optional however so all developers do not need to have the properties declared on their machines for the project to build. To this effect I'd like to specify the username and password in the artifactory block as follows:
Unfortunately when I now try publish with the artfiactoryPublish Gradle task I get a 401 unauthorized error as follows:
> java.io.IOException: Failed to deploy file: HTTP response code: 401. HTTP response message: Unauthorized
The following also fails with a similar 401 unauthorized error message:
Any ideas on why using hasProperty(...) and findProperty(...) do not work?