This guide contains some steps for setting up your local environment to work with this library. Note that this will assume that you are using IntelliJ for your IDE.
Note these steps were written using IntelliJ 2017.1 so the steps may be different for you.
- Open the project in IntelliJ.
- Install the Lombok Plugin in IntelliJ.
IntelliJ IDEA -> Preferences -> Plugins -> Browse Repositories -> Search Lombok -> Install
- Install the Checkstyle Plugin in IntelliJ
IntelliJ IDEA -> Preferences -> Plugins -> Browse Repositories -> Search Checkstyle -> Install
- Enable Annotation Processing
Build, Execution, Deployment -> Compiler -> Annotation Processors -> Enable Annotation Processing
- Add the checkstyle as the code style in the project.
- Go to the Checkstyle screen
IntelliJ IDEA -> Preferences -> Other Settings -> Checkstyle
- Update the Checkstyle version to
6.19
- Load the Checkstyle in this project by clicking the
+
and choosing configuration/checkstyle/google_6_18_checkstyle.xml - Update the code style for Java to use this checkstyle file as well:
IntelliJ IDEA -> Preferences -> Editor -> Code Style -> Java -> Code next to Schema -> Import Schema -> Checkstyle configuration
- Go to the Checkstyle screen
- Disable JavaDoc formatting. I could never get it working correctly with the checkstyle above.
IntelliJ IDEA -> Preferences -> Editor -> Code Style -> Java -> JavaDoc -> Disable JavaDoc Styling
- For some reason the imports in the code style doesn't work correctly. Updating the Import layout for the Java
code style:
IntelliJ IDEA -> Preferences -> Editor -> Code Style -> Java -> Imports
to be
import static all other imports
<blank line>
import com.google.*
<blank line>
import all other imports
<blank line>
import java.*
import javax.*
<blank line>