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 <this repo>
$ git submodule init && git submodule update
-
JDK 1.6+
-
Toolchains for compiling native libraries as follows :
Operating System Tool Chain Notes Linux GCC and G++ Mac OSX GCC or Clang Install Command Line Tools for Xcode available at the Apple Developer website. Windows Visual C++ Install Visual C++ 2010 and later. -
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
$ clone https://github.com/couchbase/couchbase-lite-android.git
at the same folder where the couchbase-lite-java is located. - At your couchbase-lite-android folder, create the test configuration file
$ cd couchbase-lite-andriod
$ cp src/androidTest/assets/test.properties src/androidTest/assets/local-test.properties
Open src/androidTest/assets/local-test.properteis and edit replicationServer pointing to your Sync-Gateway (eg. 127.0.0.1 if you run the Sync-Gateway locally). - Install and Run Sync-Gateway (See Getting Started With Sync Gateway).
You can use a sample Sync-Gateway configuration to run the test suits from here. - Go to your couchbase-lite-java, build the project and run the tests
$ ./gradlew clean && ./gradlew test
$ ./gradlew distZip
Note: The packaged file will be located at build/distributions.