1

I can't seem to find any clear answers on how to accomplish this task.

I want to take make a "Commons" library for my android project. This needs to have access to the android SDK at compile time.

I want it to be a jar.

I want it to upload to nexus (maven) and be downloadable using gradle in my other android projects.

I've managed to alternately get things to compile as an apk, as an aar and jar, or just an aar. I can't ever seem to get a straight jar out of the process, and I can't seem to get that jar uploaded.

Could somone either provide a very simple example of this in practice, or point me to a good - up to date - solution?

Nathaniel D. Waggoner
  • 2,856
  • 2
  • 19
  • 41
  • 1
    Is there a particular reason you want it to be a jar file? Do you use resources in your library project (jars can't contain resources, only aars)? – ianhanniballake Oct 20 '14 at 21:21
  • 1
    See http://stackoverflow.com/a/19484146/115145 for the generate-a-JAR part. – CommonsWare Oct 20 '14 at 22:59
  • @CommonWare - that will package the Jar, but uploading it still leads to both a Jar and an AAR being put in the maven repo. Thanks though. Do you know how to filter the AAR out? – Nathaniel D. Waggoner Oct 21 '14 at 14:02

0 Answers0