Local Development

Project is fully handled using Gradle. That includes from dependency management, to building, testing and releasing.

While IDE integration is the most common workflow, all tasks can be run using the gradlew command (i.e., the Gradle Wrapper).

We strongly recommend that you use Gradle via the Gradle daemon.

Build the artifacts

To clone the project, compile the source and build the artifacts (i.e., jars) locally, run:

$ git clone https://github.com/asciidoctor/asciidoctorj
$ cd asciidoctorj
$ ./gradlew assemble

Then, you can find the built artifacts in the asciidoctorj-*/build/libs folders.

Test

To execute tests when running the build, use:

$ ./gradlew build

To only execute the tests, run:

$ ./gradlew check

You can also run tests for a single module:

$ cd asciidoctorj-core
  ../gradlew check

To run a single test in the asciidoctorj-core subproject, use:

$ ../gradlew -Dsingle.test=NameOfTestClass test

Create distribution

To create the distribution containing all files, run:

$ ./gradlew distZip

You can find the distribution in the asciidoctorj-distribution/build/distributions folder.

Locally install the artifacts

If you need to install the artifacts in local Maven repository, for example to be used as dependency for another project.

$ ./gradlew publishToMavenLocal

Artifacts will be at ~/.m2/repository/org/asciidoctor/asciidoctorj.