Start here if you are setting up a brand new development environment, or want to reconfigure your environment from scratch.
The instructions below assume you already have available:
A recent version of IntelliJ. These steps have been validated on IntelliJ 2019.1 with Beam 2.14-SNAPSHOT
JDK 1.8 installed and configured in IntelliJ
A local git clone of the apache/beam repository in your home directory ("~/beam")
To set up your IntelliJ project:
- Launch the New Project wizard by closing your project File | Close Project.
- Then click Open from the splash page to open a new project (Depending on what version of IntelliJ you may need to find an option to "Import project" instead)
- Select the settings.gradle.kts in the root of your beam git repo
This will create the initial project and bring up the Project Structure settings.
In the Project pane, set the Project SDK to "1.8", and select Apply.
In the Modules pane, click the + and select Import Module. Select your beam repository ("~/beam") and select OK.
In the Import Module wizard, select Import module from external model, then select Gradle. Then select Next.
On the next screen, click Finish
This will close the wizard and cause IntelliJ to begin syncing project structure in the background. Continue configuring the IDE while the project syncs:
Open File | Settings... In left pane, navigate to Build, Execution, Deployment | Build Tools | Gradle | Runner. Select Delegate IDE build/run actions to gradle, and Run tests using: Gradle Test Runner. Then select Apply and OK.
Open View | Tool Windows | Gradle to open the Gradle pane.
Wait for the Gradle project to sync-- it may take 30 minutes or more. It should complete with no errors, and populate the list of Gradle projects in the Gradle pane.
Verify that your project is correctly configured by building and testing a single module.
You may also want to setup a specialized environment for the Beam modules you're working on: