title: Type BuildConfig is defined multiple times
body: <p>I'm working on a multi module Android application and everything was working in a debug mode but now when I try to build a release package I'm receiving this error:</p>
  
  <pre><code>Type ***module1.BuildConfig is defined multiple times:
  ***/module1/build/intermediates/runtime_library_classes/release/classes.jar:***/module1/BuildConfig.class,
  ***/module2/build/intermediates/runtime_library_classes/release/classes.jar:***/module1/BuildConfig.class
  </code></pre>
  
  <p>It's the first time I'm seeing an error like this and I don't know how to fix this and what's even causing it. As far as I'm aware library modules shouldn't even be generating BuildConfig files in release mode.</p>