From db67e86fc2b25d5214a906580ba680e9d31dcba7 Mon Sep 17 00:00:00 2001 From: serso Date: Tue, 4 Jul 2017 17:06:25 +0200 Subject: [PATCH] Don't include bogus artifacts --- app/build.gradle | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/build.gradle b/app/build.gradle index 75efc80a..83824889 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -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)