Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you run a Gradle task after IntelliJ imports a project from Gradle?

I'd like to be able to trigger the execution of a Gradle task right after IDEA imports my projects. Currently, I'm attempting to work around IDEA-96615 and GRADLE-2198, but I have some other use cases, such as perhaps generating some source files.

Based upon the documentation from IDEA, I'm not running gradle idea prior to importing because that generates the old style of projects, not the directory based .idea one.

like image 729
Valdis R Avatar asked Feb 24 '15 19:02

Valdis R


1 Answers

Let me know if I'm misinterpreting what you want, but I'll give it a try.

(this solution works for 2016.2, and I believe for 15)

What you can do is go to View -> Tool Windows -> Gradle

Then, click the little Gradle symbol, and it'll let you execute a gradle task: enter image description here

enter image description here

Hope this helps :)

like image 192
Jeeter Avatar answered Oct 17 '22 03:10

Jeeter