Developer Guide

Dependency management

We recommend you use formal releases of web3j, these can be found on most public maven repositories.

Release versions follow the <major>.<minor>.<build> convention, for example: 4.2.0
Snapshot versions of web3j follow the <major>.<minor>.<build>-SNAPSHOT convention, for example: 4.2.0-SNAPSHOT.
If you would like to use snapshots instead please add a new maven repository pointing to:
https://oss.sonatype.org/content/repositories/snapshots

Please refer to the maven or gradle documentation for further detail.

Sample gradle configuration:

repositories {
   maven {
      url "https://oss.sonatype.org/content/repositories/snapshots"
   }
}

Sample maven configuration:

<repositories>
  <repository>
    <id>sonatype-snasphots</id>
    <name>Sonatype snapshots repo</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  </repository>
</repositories>

Building web3j

web3j includes integration tests for running against a live Ethereum client. If you do not have a client running, you can exclude their execution as per the below instructions.

To run a full build (excluding integration tests):

$ ./gradlew check

To run the integration tests:

$ ./gradlew  -Pintegration-tests=true :integration-tests:test

Generating documentation

web3j uses the Sphinx documentation generator.

All documentation (apart from the project README.md) resides under the /docs directory.

To build a copy of the documentation, from the project root:

$ cd docs
$ make clean html

Then browse the build documentation via:

$ open build/html/index.html