This is a "portable java" version of the Couchbase Lite.
To see how this fits into the overall architecture, see the Couchbase Lite Project Structure.
$ git clone https://github.com/couchbase/couchbase-lite-java.git
$ cd couchbase-lite-java
$ git submodule update --init --recursive
-
JDK 1.7+
-
Toolchains for compiling native libraries as follows :
Operating System Tool Chain Notes Linux GCC and G++ Mac OSX GCC or Clang Windows Visual C++ Install Visual Studio 2013. (Visual Studio 2015 is not supported yet) -
To setup a Linux cross complier to compile both x86 and x86_64 linux native libraries on 64 bit machine, you may setup your toolchain as below :
$ sudo apt-get install gcc-multilib $ sudo apt-get install g++-multilib
Note: Currently we are sharing the test suits with Couchbase-lite-android project and the following steps will copy the test classes over and run the test suit.
- Clone Couchbase-lite-android project
$ git clone https://github.com/couchbase/couchbase-lite-android.git
at the same folder where the couchbase-lite-java is located (parent folder of couchbase-lite-java). - Go to your couchbase-lite-java, build the project and run the tests
$ ./gradlew clean && ./gradlew test
If you need to see the test output to debug them, you can run ./gradlew --debug --info test
Note: there seems to be no way to see the test output when using the command line, so if you need to see the test output, use the IntelliJ IDE instead
- Build on command line - run
$ ./gradlew build
- Clone Couchbase-lite-android project
$ git clone https://github.com/couchbase/couchbase-lite-android.git
at the same folder where the couchbase-lite-java is located (parent folder of couchbase-lite-java). - Open IntelliJ and import project by selecting settings.gradle
- In IntelliJ project window, browse to /src/test/java/
- Right-click on an individual test or package and choose Run Test ..
$ ./gradlew distZip
Note: The packaged file will be located at build/distributions.