You should allow me to configure gradle to read my existing settings.xml for username/password credentials when configuring uploadArchives.
This would allow me to avoid putting credentials into my source repository.
Something like this:
uploadArchives {
repositories {
mavenDeployer {
repository(url: "http://nexus.example.com/content/repositories/snapshots/") {
authentication(mavenSettings: "~/.m2/settings.xml")
// or re-use your gradle.properties!
authentication(gradleProperties: "~/.gradle/gradle.properties")
}
pom.project {
licenses {
license {
name 'The Apache Software License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
}
}
}
}