# Publishing a SQLCipher for Android AAR

**URL:** <https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702>\
**Category:** SQLCipher\
**Created:** [August 3, 2015, 5:42pm UTC](https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702 "2015-08-03T17:42:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![commonsguy](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/commonsguy/32/75_2.png) [@commonsguy](https://discuss.zetetic.net/u/commonsguy)\
**Post date:** [August 3, 2015, 5:42pm UTC](https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702/1 "2015-08-03T17:42:28Z")

</div>

I mentioned this back on the old Google Group last year sometime, but since there has been no movement, I figured I’d press the issue a bit more…

With official Eclipse support from Google ending at the end of 2015, most developers will (hopefully) be moving over to Android Studio. There are better ways of packaging something like SQLCipher for Android for Android Studio, in the form of an AAR artifact in an artifact repository. Then, it just takes a couple of lines in a Gradle build script to integrate SQLCipher for Android, rather than having to unpack the ZIP archive into all the right spots, worry about getting the asset right, and so on.

Setting up such an artifact is not especially difficult. I have a (presently private) GitHub repo that implements such a repackaging of the SQLCipher for Android binaries into an AAR. I would love to work with Zetitec to help you do this same sort of packaging and distribution. It’d take maybe an hour or two of initial setup, plus 5-10 minutes per official SQLCipher for Android release in the future for updates. Or, if you don’t want to be bothered with this, with your permission, I can offer to publish the AAR based on the official SQLCipher for Android binaries.

Please let me know if there is anyone that I can work with on Zetetic’s side related to this, whether via this list, private discussions, or whatever.

Thanks!

---

<div class="post-metadata">

**Author:** ![sjlombardo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/sjlombardo/32/3_2.png) [@sjlombardo](https://discuss.zetetic.net/u/sjlombardo)\
**Post date:** [August 4, 2015, 4:13pm UTC](https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702/2 "2015-08-04T16:13:35Z")

</div>

Hi @commonsguy,

Thanks for following up on this. I recall the previous conversation on the old Google Group, but it dropped off our radar. We are definitely interested in pursuing this, but haven’t had a lot of time to work on it presently. We would like to maintain something like this as a part of our standard packaging and distribution, and ideally integrate it with our Jenkins build process. This way we could maintain a centralized point to distribute and access SQLCipher resources, including signatures for those interested.

Would you be interested in contributing the work you’ve done on the repackaging in your private GitHub repo back to the project? That would be much appreciated, and would likely accelerate implementation on our end considerably.

---

<div class="post-metadata">

**Author:** ![commonsguy](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/commonsguy/32/75_2.png) [@commonsguy](https://discuss.zetetic.net/u/commonsguy)\
**Post date:** [August 4, 2015, 5:03pm UTC](https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702/3 "2015-08-04T17:03:19Z")

</div>

> [@sjlombardo](#):
>
> Would you be interested in contributing the work you’ve done on the repackaging in your private GitHub repo back to the project?

It depends on what you mean by “contributing the work… back to the project”.

I am happy to make my GitHub repo public and document what it is doing, as a reference point for how to create a SQLCipher AAR from your compiled binaries. Or, if you would prefer it not be public, contact me off-list ([mmurphy@commonsware.com](mailto:mmurphy@commonsware.com)) and I can get you access to the private repo.

However, I am not really in position to attempt to modify your own repo. You have a very idiosyncratic build process, and I haven’t the foggiest notion of how to modify it safely. While there’s probably a way to wrap your `make`-based build in Gradle, that can then turn around and use other Gradle plugins for packaging the AAR, `make` is not my strong suit.

Let me know how you would like to proceed – thanks!

---

<div class="post-metadata">

**Author:** ![eighthave](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/eighthave/32/187_2.png) [@eighthave](https://discuss.zetetic.net/u/eighthave)\
**Post date:** [September 21, 2015, 1:17pm UTC](https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702/4 "2015-09-21T13:17:23Z")

</div>

I’m pretty sure that this is enough for creating a full AAR of SQLCipher-for-Android using the existing build process:

[github.com/sqlcipher/android-database-sqlcipher/pull/197](http://github.com/sqlcipher/android-database-sqlcipher/pull/197)

Instead of creating yet another wrapper in this build system, which is already a couple wrappers, this pull request makes `ant` build the AAR following Google’s AAR spec (it is quite simple).

The wacky build system here is my fault to a large degree 😉 We built this project by ripping out the core android-database API from Android, and turning into this library. Android has a pretty whacked build system, which is then smashed into `ant` and `make`, which is then wrapped into SQLite’s `make` build system. 😃

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 8, 2015, 5:17pm UTC](https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702/5 "2015-10-08T17:17:35Z")

</div>

Hi @commonsguy, @eighthave

We have just released SQLCipher for Android 3.3.1-1 which is distributed as an AAR package, more information can be found [here](https://discuss.zetetic.net/t/sqlcipher-for-android-3-3-1-1-release/806).

---

<div class="post-metadata">

**Author:** ![commonsguy](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/commonsguy/32/75_2.png) [@commonsguy](https://discuss.zetetic.net/u/commonsguy)\
**Post date:** [October 8, 2015, 10:11pm UTC](https://discuss.zetetic.net/t/publishing-a-sqlcipher-for-android-aar/702/6 "2015-10-08T22:11:40Z")

</div>

And there was much rejoicing! 😄

I’ll give it a try on Monday and will deprecate mine once I’ve tried it out.

Many, many thanks!
