Skip to content
This repository was archived by the owner on Jul 22, 2021. It is now read-only.

Latest commit

 

History

History
105 lines (69 loc) · 2.89 KB

File metadata and controls

105 lines (69 loc) · 2.89 KB

Contributing

Issues

Please read these guidelines before opening an issue. If you still need to open an issue then we ask that you complete the template as fully as possible.

Pull requests

We welcome pull requests, but ask contributors to keep in mind the following:

  • Only PRs with the template completed will be accepted
  • We will not accept PRs for user specific functionality

Developer Certificate of Origin

In order for us to accept pull-requests, the contributor must sign-off a Developer Certificate of Origin (DCO). This clarifies the intellectual property license granted with any contribution. It is for your protection as a Contributor as well as the protection of IBM and its customers; it does not change your rights to use your own Contributions for any other purpose.

Please read the agreement and acknowledge it by ticking the appropriate box in the PR text, for example:

  • Tick to sign-off your agreement to the Developer Certificate of Origin (DCO) 1.1

General information

The java-cloudant-cache project is written in Java and uses gradle as its build tool and the maven central repository for dependencies.

Coding guidelines

The project uses the Google Java Style with the following changes:

4.2
    Our block indent is +4 characters

4.4
    Our line length is 100 characters.

4.5.2
    Indent continuation of +4 characters fine, but I think
    IDEA defaults to 8, which is okay too.

Code Style

An IDEA code style matching these guidelines is included in the project, in the .idea folder.

If you already have the project, to enable the code style follow these steps:

  1. Go to Preferences -> Editor -> Code Style.
  2. In the Scheme dropdown, select Project.

IDEA will then use the style when reformatting, refactoring and so on.

Requirements

  • gradle
  • Java 1.8

Installing requirements

Java

Follow the instructions for your platform.

Gradle

The project uses the gradle wrapper to download specified version of gradle. The gradle wrapper is run by using the following command:

$ ./gradlew

Note: on windows the command to run is gradlew.bat rather than gradlew

Building

The project should build in a cloned repository with:

$ ./gradlew assemble

Testing

The tests run as part of Travis CI when branches are pushed to the github repository.

If you want to run the tests locally then note that some tests require additional services:

  • DatabaseCacheTests need an Apache CouchDB instance or Cloudant instance and if it is not at http://localhost:5789 you should set the system property test.couch.url with the correct url e.g. (http://your.example:1234).
  • RedisCacheTests require a running Redis instance on the default localhost:6379

Run the tests using:

$ ./gradlew test