You can use this project as a reference for interacting with Google Spreadsheet using the Spreadsheet Builder API.
Click on Import Project and select the folder where have you cloned or downloaded the project files.
Select Import project from external model > Gradle
Keep the defaults and click Finish
When IntelliJ IDEA is finished with downloading all the necessary libraries you should see the following structure in the Project explorer.
Visit Java Quickstart page and enable the Drives API for the Quickstart project.
Now you can explore the code in App.java
For more information on using Spreadsheet Builder see the official documentation.