title: How to compile project with Google Checkstyle rules with gradle?
body: <p>I am trying to use Google checkstyle configuration (<a href="https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml" rel="noreferrer">https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml</a>) but I am constantly getting an error on <code>gradle check</code>:</p>
  
  <pre><code>Unable to create a Checker: cannot initialize module TreeWalker - Unable to instantiate EmptyCatchBlock
  </code></pre>
  
  <p>I used Gradle to build the project. Below is my gradle.build. </p>
  
  <pre><code>apply plugin: 'java'
  apply plugin: 'idea'
  apply plugin: 'checkstyle'
  
  sourceCompatibility = 1.8
  version = '1.0'
  
  checkstyle {
      toolVersion = "6.3"
  }
  
  task "create-dirs" &lt;&lt; {
     sourceSets*.java.srcDirs*.each { it.mkdirs() }
     sourceSets*.resources.srcDirs*.each { it.mkdirs() }
  }
  
  jar {
      manifest {
          attributes 'Implementation-Title': 'xyz',
                     'Implementation-Version': 0.01
      }
  }
  
  repositories {
      mavenCentral()
  }
  
  dependencies {
      compile (
          ['org.apache.logging.log4j:log4j-api:2.2'],
          ['org.apache.logging.log4j:log4j-core:2.2']
      )
      testCompile(
          ['junit:junit:4.11'],
          ['org.mockito:mockito-core:1.+']
      )
  }
  
  test {
      systemProperties 'property': 'value'
  }
  
  uploadArchives {
      repositories {
         flatDir {
             dirs 'repos'
         }
      }
  }
  </code></pre>
  
  <p>Also, when I try to add XML config file to Checkstyle plugin in IDEA I get similar error but with a stack trace:</p>
  
  <pre><code>org.infernus.idea.checkstyle.exception.CheckStylePluginException: &lt;html&gt;&lt;b&gt;The CheckStyle rules file could not be loaded.&lt;/b&gt;&lt;br&gt;cannot initialize module TreeWalker - Unable to instantiate EmptyCatchBlock&lt;/html&gt;
      at org.infernus.idea.checkstyle.checker.CheckerFactory.blacklistAndShowMessage(CheckerFactory.java:234)
      at org.infernus.idea.checkstyle.checker.CheckerFactory.createChecker(CheckerFactory.java:188)
      at org.infernus.idea.checkstyle.checker.CheckerFactory.getOrCreateCachedChecker(CheckerFactory.java:98)
      at org.infernus.idea.checkstyle.checker.CheckerFactory.getChecker(CheckerFactory.java:73)
      at org.infernus.idea.checkstyle.checker.CheckerFactory.getChecker(CheckerFactory.java:41)
  </code></pre>
  
  <p>I cannot figure out what am I doing wrong. Any help would be appreciated.
  Gradle version: 2.2</p>