Java wrapper around CBForest. Includes SWIG generated java wrappers for CBForest.
$ git clone <repo>
$ cd couchbase-lite-java-forestdb
$ git submodule update --init --recursive
-
- Install SWIG -- Optional: This is required if you want to generate JNI interface files (C/C++/Java) from SWIG interface file.
If you are using Mac OSX
$ brew install swig
-
- Install Android NDK version r10c
Note: Please add ANDROID SDK and NDK home directories in the envronment PATH
export ANDROID_HOME=<Android SDK home directory>
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH
#export ANDROID_NDK_HOME=<NDK home directory>
#export PATH=$ANDROID_NDK_HOME:$PATH
$ ./gradlew -Pspec=android assemble
$ cd build/outputs/aar
$ ./gradlew -Pspec=android connectedAndroidTest --debug
$ ./gradlew -Pspec=java assemble
$ cd build/libs
$ make swig
Note: Update Makefile to specify your NDK build command path
$ make ndk-build
$ make jar
- cbforest.jar
- libs/[platform]/libcbforest.so
- Needs to install clang:
sudo apt-get install clang
for Ubuntu - Unable to cross-compile x86 build on 64bit machine.
clang
does not work withgcc-multilib
andg++-multilib
. We might needs to switch to GCC, but it requires CBForest code changes.