简体   繁体   中英

Gradle only downloads pom from mavenCentral - Android

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?

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM