3

I have developed an Android Library which I have packaged as an AAR file. I have used progaurd to obfuscate the code that I would like to keep proprietary.

My question is about distribution. I would like to make installation of the library quick and easy using gradle. The issue is that existing repositories (Maven Central and Jcenter) require you to commit to an OSS license. I am fine with having the AAR file itself in the public domain, however my understanding is that an OSS license would legally require me to provide the [pre-obfuscation] source code to customers should they request it.

The current method of distribution is downloading the aar file from a web server, and manually inserting the aar file into the libs directory of a project.

How can I publish the AAR file to a repository that makes installation of the library easy using gradle without committing to an OSS license?

Cognitio
  • 410
  • 1
  • 4
  • 14
  • 1
    Create your own artifact repository. It's just a specific directory structure. My CWAC libraries [are hosted on Amazon S3](https://s3.amazonaws.com/repo.commonsware.com), for example, yet they can still be pulled in using normal `compile` statements, though you have to add a line for the repository as well. – CommonsWare Aug 02 '16 at 00:23
  • Interesting! Thanks for your response. Can you point me towards a resource to get me started? I was messing around with starting a server just to host Artifactory, but it just seemed like such overkill for what I was trying to accomplish. If it really is as straightforward as complying to a directory structure, why the need for a complicated product like Artifactory? – Cognitio Aug 02 '16 at 00:28
  • 1
    Um, well, pretty much, you look at an existing repository (mine, http://repo.maven.apache.org/maven2/, etc.), then figure out how best you want to mimic the structure. See also http://stackoverflow.com/a/8382083/115145 and http://stackoverflow.com/q/13370666/115145. For serving over HTTP, you need directory listings to work, which can be handled via `index.html` files (e.g., [this one](https://s3.amazonaws.com/repo.commonsware.com/com/commonsware/cwac/security/index.html)). – CommonsWare Aug 02 '16 at 00:36
  • Hi @Cognitio. I am trying to achieve the same task. Could you provide a kinda step by step tutorial on how to achieve this ? If so, I will definitely upvote your answer. Thanks – frouo Jan 02 '18 at 16:38
  • or @CommonsWare ? – frouo Jan 02 '18 at 20:25
  • Hi @Frouo, I also have the same goal, and I'm wondering if you had ever found a step-by-step tutorial to do it? Thanks! – ScottyB Jul 12 '18 at 21:18

0 Answers0