Making changes from here

If you make changes to your build.gradle file, make sure to have IntelliJ re-import from gradle by going to the Gradle tab (on the right of the IntelliJ window) and clicking Refresh (the little blue arrows-in-a-circle).

You can always build the project (which includes running the tests) by running ./gradlew build.

I want to make this myself

If you want to create this sort of project from scratch rather than using my pre-made copy in this repo, follow these instructions.

Set up a git repo

All coding happens in a vcs (version control system). Git is as good a choice as any, so we'll use that.

mkdir your-project-name
cd your-project-name
git init

From now on, all commands assume that you'll be in your your-project-name directory.

Add a .gitignore so you don't track files that shouldn't be in vcs

Download gradle

Gradle is the build tool of choice. We'll be using gradle to generate the gradle wrapper. The gradle wrapper means that from now on, you (and your teammates) won't have to install gradle to build your project; the files needed to bootstrap gradle will be baked into the project itself. This also means that your build tool will be versioned along with your code, which is fantastic.

If you're on Mac or Linux, or you have a shell set up on Windows, install gvm aka sdkman and install gradle with:

sdk install gradle

If you're on Windows without a working shell (which is most Windows users), download the Gradle zip and unzip it. It doesn't much matter where you put it; just remember where you unzipped it to.

Or, you can always install gradle manually; see the gradle docs.

Generate the gradle wrapper

In your project folder, run:

gradle wrapper

If you're on Windows, instead of gradle you'll need to use the full path to gradle.bat in the bin dir of your unzipped copy of Gradle.

Create a build.gradle file

The build.gradle file defines how Gradle will build your project. In this case, we'll create a basic Java project and pull in a couple of dependencies just to show how to do it.