title: Gradle : Unable to generate QueryDSL classes
body: <blockquote>
    <p>Gradle version: 5.1 </p>
    
    <p>Java version: 11</p>
  </blockquote>
  
  <p>I have the following task defined in <code>gradle</code> file to generate <code>QueryDSL</code> classes:</p>
  
  <pre><code>task generateQClasses (type: JavaCompile) {
      source = sourceSets.main.java.srcDirs
      classpath = sourceSets.main.compileClasspath
      destinationDir = file('src/main/java')
      options.annotationProcessorPath = configurations.annotationProcessor
      options.compilerArgs = ['-proc:only', '-processor', 'com.querydsl.apt.jpa.JPAAnnotationProcessor', '-Aquerydsl.packageSuffix=.querydsl']
  }
  </code></pre>
  
  <p>Below is my dependencies block:</p>
  
  <pre><code>annotationProcessor "com.querydsl:querydsl-apt:4.2.1:jpa"
  annotationProcessor "org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final"
  annotationProcessor "javax.annotation:javax.annotation-api:1.3.2"
  </code></pre>
  
  <p>If I execute `gradlew generateQClasses, I see the following in the logs:</p>
  
  <pre><code>Attempt to recreate a file for type foo.bar.QClass
  error: Attempt to recreate a file for type foo.bar.QClass
  </code></pre>
  
  <p>It fails with error saying the file already exists. How can I configure this task to overwrite the files if they exist?</p>
  
  <p>Also, the above config is the config for the root project and it has 5 subprojects. <code>AnnotationProcessor</code> is able to overwrite the files in one of the sub project but not the others (all the subprojects have the same config). Am I missing anything?</p>