How to depend on bitcoinj with Gradle using projects

Gradle is a plugin based build system, originally from Hans Dockter. Gradle is mostly replacing the aging Maven and what was left of Ant.

If your project uses Gradle for its build, you can depend on bitcoinj by adding the following snippet to your build.gradle file:

dependencies {
    compile 'org.bitcoinj:bitcoinj-core:0.16.4'
}