1

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?

Machinarius
  • 3,637
  • 3
  • 30
  • 53

2 Answers2

4

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.

Dia Kharrat
  • 5,948
  • 3
  • 32
  • 43
  • I wound up doing something like this to avoid the `@aar` workaround – Machinarius Dec 05 '13 at 14:27
  • I have a [very similar problem](http://stackoverflow.com/questions/21942727/gradle-only-downloads-aar-asc-from-maven-central) - can you tell how I can test this locally? – JJD Feb 21 '14 at 18:50
1

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.

Peter Niederwieser
  • 121,412
  • 21
  • 324
  • 259