Before following these steps, be sure you've set up your IntelliJ environment.

IntelliJ supports running Gradle tasks directly, including building and running tests. Gradle understands the dependency graph for a module and will only build the necessary dependent tasks. So, building a module is as simple as finding the Gradle task you want inside IntelliJ and running it.

  1. In your IntelliJ beam project, navigate to View | Tool Windows | Gradle to open the gradle sidebar
  2. In the gradle sidebar, find the project you're looking for and expand it; for example "beam | sdks| sdks-java | io | hbase"
  3. Under your project, expand Tasks | build, and double-click the build task to execute it.


The first build may be slow as gradle builds all dependent tasks. However Gradle will cache previous outputs, and the next execution will only re-run tasks with changes.

Useful Gradle Tasks

Each Gradle project has many available tasks, though most you will not need to run directly:

  • build: Compile / assemble the project
  • check: Run unit tests and static analysis on the project
  • spotlessApply: Automatically format code (Java/Groovy only)


  • No labels