0

IntelliJ – no default gradle tasks in Gradle Tool Window

empty gradle tool window default tasks

empty gradle tool window default tasks

When installing gradle manually on linux you may experience no default gradle tasks in IntelliJ’s gradle tool window.

You can fix this issue while granting write permissions to the gradle installation directory. Write permissions are required when IntelliJ runs gradle test task as an example. Then write actions happen to these gradle installation subdirectories:

  • caches
  • daemon
  • native
  • task-cache
  • wrapper

One option to grant directory permissions for a specific user is setfacl:

 sudo setfacl -m u:[username]:[permissions] [directory]

a specific example within /opt/gradle/ would be:

 sudo setfacl -m u:lothar:rwx gradle-4.0.1

.

This setup assumes IntelliJ is configured to use the manually installed gradle:

Build, Execution, Deployment - Build Tools - Gradle

Build, Execution, Deployment -> Build Tools -> Gradle

IntelliJ is able to run the project refreshing tasks, once write permissions to the Gradle installation directory are granted.

Gradle project refresh tasks

Gradle project refresh tasks

That works best when reimporting the whole software gradle project into IntelliJ (overwriting idea project files).

 

Finally the gradle tasks tool window contains gradle default tasks:

Gradle default tasks in gradle tool window

Gradle default tasks in gradle tool window

Lothar Schulz

Leave a Reply

Your email address will not be published. Required fields are marked *