Prerequisite: Installing Gradle
Once you have Gradle installed, you can setup a new or existing project by running
cd $PROJECT_DIR
gradle init --type=java-library
Note that there are other project types like Scala you can get started with, but we'll use Java for this example.
You will end up ...