workaround for aar dependencies in pom.
Apparently depending on a non jar dependency in
a pom must include the type of the dependency, even though
the dependency declares its own type in its pom.
Since Gradle doesn't properly do this, a workaround
is to customize the pom on the fly to do this (until Gradle
is fixed).
Change-Id: Id39ae4b4183e621ba1295ae8ee840fd0125e5d6e
diff --git a/build.gradle b/build.gradle
index 9ac4cd8..d364879 100644
--- a/build.gradle
+++ b/build.gradle
@@ -147,6 +147,11 @@
}
}
+ def deployer = release.repositories.mavenDeployer
+ deployer.pom*.whenConfigured { pom ->
+ pom.dependencies.findAll {dep -> dep.groupId == 'com.android.support' && dep.artifactId != 'support-annotations' }*.type = 'aar'
+ }
+
// before the upload, make sure the repo is ready.
release.dependsOn rootProject.tasks.prepareRepo
// make the mainupload depend on this one.