title: Annotation Processors generated resources not packaged to APK
body: <p>I've custom annotation processor generating factory classes and <code>META-INF/services/factory.interface.class</code> resource.</p>
  
  <p>Annotation processor is used in library project and all generated files are packaged correctly into AAR.</p>
  
  <p>When I use annotation processor in application project with library added as a dependency only classes from libraries <code>META-INF/services/factory.interface.class</code> exist in <code>APK/META-INF/services/factory.interface.class</code></p>
  
  <p>After some investigation I realized that <code>MergeJavaResourcesTransform</code> in android-gradle-plugin-1.5.0 (and 2.0.0-alpha3) looks for resources for merging in all <code>exploded-aar</code>s, <code>jar</code>s, and <code>intermediates/sourceFolderJavaResources</code></p>
  
  <p>Is there any way to merge <code>META-INF</code> from <code>intermediates/classes</code> (it's where resource files from annotation processor get created) or make annotation processor create file in <code>sourceFolderJavaResources</code>?</p>
  
  <p>Only workaround I've found so far is to add <code>CopyTask</code> in application's buildscript</p>
  
  <pre><code>android.applicationVariants.all { variant -&gt;
    def variantName = variant.name
    def variantNameCapitalized = variantName.capitalize()
    def copyMetaInf = tasks.create "copyMetaInf$variantNameCapitalized", Copy
    copyMetaInf.from project.fileTree(javaCompile.destinationDir)
    copyMetaInf.include "META-INF/**"
    copyMetaInf.into "build/intermediates/sourceFolderJavaResources/$variantName"
    tasks.findByName("transformResourcesWithMergeJavaResFor$variantNameCapitalized").dependsOn copyMetaInf
  }
  </code></pre>
  
  <p>But I do not wat to force compiler an library users do do anything more than adding dependencies.</p>