title: How to set checkstyle configuration from Gradle in IDEA
body: <p>I am using the Checkstyle plugin in IDEA. I want to set up different checkstyle configurations to my different modules. I am using gradle as build tool-version 4- and I want to write a task that modifies the corresponding .iml files of the modules. <strong>Any idea how to do that?</strong></p>
  
  <p>My very first attempt in modifying the iml file looking over <a href="https://docs.gradle.org/4.0/userguide/idea_plugin.html#sec:partial-rewrite" rel="nofollow noreferrer">here</a></p>
  
  <pre><code>apply plugin: 'idea'
  
  
  task setCheckStylePluginSettings {
      group = "Idea"
      description = "Copies CheckStyle plugin settings to Idea workspace."
  
      println "Step 1."
      idea.module.iml {
      withXml {xmlProvider -&gt;
          // Get root node.
          println "Step 2."
          def project = xmlProvider.asNode()
          }
      }
   }
  </code></pre>
  
  <p>However, I am stuck just at the beginning that I cant event see the <em>Step 2</em> printed on the Console.</p>