Quick scripted compilation of Libsodium for Android
Java Shell Makefile
Permalink
Failed to load latest commit information.
gradle/wrapper Build aar artifact with Gradle Jul 23, 2015
jni added crypto_core_hsalsa20 from libsodium to JNI interface Aug 14, 2015
libsodium @ f379ab8 Releasing library Mar 31, 2015
src/main Hex.java. Amend typo on javadoc that was failing in gradle build arti… Jan 20, 2016
.gitignore Add SWIG generated files to .gitignore Dec 26, 2015
.gitmodules Releasing library Mar 31, 2015
.travis.yml Ammend incorrect script call Aug 17, 2015
LICENSE.txt add license Mar 31, 2015
README.md Update README.md with AAR build steps Dec 26, 2015
build.gradle This commit fixes #9 The new minSdkVersion now is 9 Feb 19, 2016
build_aar Script to publish to Maven Central Dec 26, 2015
build_aar_osx Script to publish to Maven Central Dec 26, 2015
build_android_libsodium.sh Fixed a bug Jan 20, 2016
build_android_libsodium_osx.sh Fixed a bug Jan 20, 2016
build_jni.sh Fixed a bug Jan 20, 2016
build_jni_linux.sh Modify gitignore and ammend autogen from build_jni_linux Jul 8, 2015
build_jni_osx.sh Added switch between osx and win Jan 20, 2016
do_the_job.sh Fixed a bug Jan 20, 2016
download_ndk.sh Fixed a bug Jan 20, 2016
download_ndk_osx.sh Added switch between osx and win Jan 20, 2016
gradle.properties Update POM_DEVELOPER_NAME Jan 20, 2016
gradlew Build aar artifact with Gradle Jul 23, 2015
gradlew.bat Build aar artifact with Gradle Jul 23, 2015
install_software.sh Fixed a bug Jan 20, 2016
install_software_osx.sh Fixed a bug Jan 20, 2016
proguard-rules.pro Build aar artifact with Gradle Jul 23, 2015

README.md

Robosodium

Robosodium was born as a fork of kalium-jni. With this library you will be able to compile libsodium for Android platforms and automatically create the wrapper for the JNI.

Credits to:

How to

  1. First of all download this repository and its submodules:

    $ git clone https://github.com/GerardSoleCa/Robosodium
    $ git submodule init 
    $ git submodule update
  2. Start from first clone:

    $ ./do_the_job.sh
  3. Build JNI for Linux instead of Android:

    $ ./do_the_job.sh linux
  4. Where to find the compiled libs:

    cd libs # Libs for Android using the architecture dirs
    cd linux_lib # Lib for Linux. To be used copy to /usr/lib for example. Or just place anywhere you want
  5. If something goes wrong or you want to run again some parts of the compilation, just call the following scripts:

    do_the_job.sh # Start and run all the scripts
    install_software.sh # First update aptitude cache and install necessary packages
    build_jni_linux.sh # Build libsodium with jni for linux.
    download_ndk.sh # Download the required Android NDK
    build_android_libsodium.sh # Compile Libsodium for Android
    build_jni.sh # Generate the JNI library (*.so)

Build AAR

On Linux, simply run:

$ ./build_aar

On OS X, ensure that you have SWIG, Android SDK and NDK installed, and your JAVA_HOME, ANDROID_HOME, ANDROID_NDK_HOME set, then run:

$ ./build_aar_osx

License

Each part has its own software license, including: