title: Dev mode dependency for gradle in IDEA
body: <p>I want to add dependency on <code>spring-boot-devtools</code> but only for development.
  I try to achieve this by having this snippet in my <code>build.gradle</code>:</p>
  
  <pre><code>if (project.hasProperty('use-spring-boot-devtools')) {
      compile 'org.springframework.boot:spring-boot-devtools'
  }
  </code></pre>
  
  <p>Then I can define in my <code>~/.gradle/gradle.properties</code></p>
  
  <pre><code>use-spring-boot-devtools = true
  </code></pre>
  
  <p>Unfortunately this doesn't work when I run import project in IDEA. I would like to use <a href="https://stackoverflow.com/questions/30333837/where-to-put-the-gradle-properties-file#30333929">answer to related question</a> but still can't figure out how to define environment variable that will affect gradle inside IDEA.</p>