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!
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.
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) 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!
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
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.
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.
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!