Question

I have successfully deployed an AAR artifact to mavenCentral using Sonatype's OSS Nexus but when i reference it on another project gradle is only downloading the pom and it's respective ASC file to ~/.gradle/cache.

This is my build.gradle http://pastie.org/private/zaxa13hsd52e4elfpnne4w This is the build.gradle for the library https://github.com/Machinarius/PreferenceFragment-Compat/blob/master/build.gradle

Can anyone point me in the right direction?

Était-ce utile?

La solution

The aar.asc packaging is coming from this section in your gradle configuration:

configurations {
  archives {
    extendsFrom configurations.default
  }
}

Remove those lines from your build.gradle file and deploy again. You should see the packaging be aar now.

Autres conseils

The value for the POM's packaging element (aar.asc) looks wrong. You should nevertheless be able to fetch the artifact with something like dependencies { compile 'com.github.machinarius:preferencefragment:0.1@aar' }. With this "artifact only" notation, you won't get transitive dependencies, but you can always declare those yourself.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top