Pre-requisite
- IntelliJ
- Gradle enabled in intelliJ
Steps
- Open Intellij
- Navigate to File -> New Project and it will show below window
- Select Gradle project as shown below, select Java installation location if not already set and click on next.
- As shown below, provide project name, location, group id and artifact id and click on finish
- This should create your new Gradle project. The build.gradle will look below.
- Next will create a class and run the project to display Hello World. It is pretty much self explanatory from here on. The gradle project creation is completed at the 5th step already. The below steps are just to try and create a new class and make it run.
Create new class
print hello world
Right Click on the HelloWorld class and select run to run the program.