Gradle unable to properly authenticate against Artifactory

My experience with Artifactory is that it requires preemptive auth depending on how it is configured. You can force Gradle to send auth headers with the initial connection by adding the following block inside your maven { } declaration:

authentication {
  basic(BasicAuthentication)
}