Skip to content

Latest commit

 

History

History
85 lines (63 loc) · 2.13 KB

CONTRIBUTING.md

File metadata and controls

85 lines (63 loc) · 2.13 KB

Developing cadence-java-client

This doc is intended for contributors to cadence-java-client (hopefully that's you!)

Note: All contributors also need to fill out the Uber Contributor License Agreement before we can merge in any of your changes

Development Environment

  • Java 11 (currently, we use Java 11 to compile Java 8 code).
  • Thrift 0.9.3
  • Gradle build tool
  • Docker

Licence headers

This project is Open Source Software, and requires a header at the beginning of all source files. To verify that all files contain the header execute:

./gradlew licenseCheck

To generate licence headers execute

./gradlew licenseFormat

Commit Messages

Overcommit adds some requirements to your commit messages. At Uber, we follow the Chris Beams guide to writing git commit messages. Read it, follow it, learn it, love it.

Test

Testing and building cadence-java-client requires running cadence docker locally, execute:

curl -O https://raw.githubusercontent.com/uber/cadence/master/docker/docker-compose.yml
docker-compose up

(If this does not work, see instructions for running the Cadence Server at https://github.com/uber/cadence/blob/master/README.md.)

Then run all the tests with:

./gradlew test

The test by default will run with TestEnvironment without Cadence service. If you want to run with Cadence serivce:

USE_DOCKER_SERVICE=true ./gradlew test

And sometimes it's important to test the non-sticky mode

STICKY_OFF=true USE_DOCKER_SERVICE=true ./gradlew test

Also, if there is any Buildkite test failure that you cannot reproduce locally, follow buildkite docker-compose instructions to run the tests.

Build & Publish

Build with:

./gradlew build

To test locally, change build.gradle:

  1. Comment out the whole publications
  2. Change
group = 'com.uber.cadence'

to

group = 'com.local.cadence'

Then run the command

./gradlew publishToMavenLocal

Now you can use the local cadence-java-client in your laptop.