When library depends on different type of artifact, pom should contain element in dependency declaration, but Cradle omit it during deploy to repo. it is really serious problem.
The Poms generated by Gradle that list AARs as dependencies don’t actually specify the the type as AAR. Which means the deps actually resolve to JAR files and not AAR files.
@Sterling it’s not about what version of Gradle I’m using (I don’t use Gradle - not rigorous enough for me), it’s about what version of Gradle is being used by the Android SDK team as the POM artifacts they are generating are invalid.
But it must work correctly also without explicit @aar declaration. Gradle should check default type from the pom.xml a and then use it as in the new pom.xml. Because if I explicitly use @aar, current version of Gradle skip transitive dependencies.
So I think that this is still issue. In this case gradle should check type of dependency from it’s pom. It already must do, so it only doesn’t use the result in right way.
The problem with @aar is that I can’t really use this in inter-project dependencies, can I?
We have a project which publishes several aars into a maven repositories. The dependencies between the project is done with
compile project(':foo')
And then we publish all of them at once. This dependency is converted into a pom dependency that is broken. Gradle is publishing both the aar being consumed and the artifact doing the consumption. It should be able to properly add the missing type node in the pom.