After you've obtained the assignment code, there are two possible ways to load that code in IntelliJ: either as a whole project, or as a single module in a project. IntelliJ can only open one project in each window, but each project may have multiple modules.
We recommend importing our code as separate projects, since our assignments contain duplicated files that sometimes confuse IntelliJ, however you may choose to use a single project if you wish; see the bottom of the page for instructions. (Benefits of the single-project workflow include only needing to set our settings for a single project instead of all new projects, and having the ability to view files from all assignments in the same IntelliJ window.)
This section of the guide covers how to import code as a new project. Note that you should import the project the first time instead of simply opening it. Opening a project will attempt to open it as an existing IntelliJ project, which may cause issues if your partner accidentally commits his/her IntelliJ project files, whereas importing will guarantee that you create a new project. (On the other hand, if you've already imported the code on your machine before, you should open the project instead of re-importing it.)
You should also make sure you're connected to the internet when performing these steps. When you're importing the project, IntelliJ will automatically try to download any libraries you need to run your code.
Run IntelliJ. If you're on the welcome screen click "Import Project":
If you have another project open, click "File" > "New" > "Project from Existing Sources...":
Navigate to and select the folder containing the code, and then click "OK". There
should be a build.gradle
file directly inside that folder. (You may also
select the build.gradle
file instead if using the folder doesn't work.)
Make sure that "Gradle" is selected on the next screen, then click "Next"
Make sure that "Use auto-import" is checked and that "Use gradle 'wrapper' task configuration" is selected, then click "Finish".