Don't include bogus artifacts

This commit is contained in:
serso 2017-07-04 17:06:25 +02:00
parent c6e62fee37
commit db67e86fc2

View File

@ -162,7 +162,15 @@ version = android.defaultConfig.versionName
uploadArchives {
repositories {
mavenDeployer {
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
beforeDeployment { MavenDeployment deployment ->
signing.signPom(deployment)
// for some reason Gradle :uploadArchives tries to upload null.txt.asc and null.map artifacts.
// As we don't want those let's filter them now (note that these files are not included in the
// list of project artifacts, so their origin is not clear)
def removeCond = { artifact -> return !artifact.classifier && (artifact.type == "map" || artifact.type == "txt.asc") }
deployment.artifacts.removeAll(removeCond)
deployment.attachedArtifacts.removeAll(removeCond)
}
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: ossrhUsername, password: ossrhPassword)