title: Product Flavor: Duplicate class found
body: <p>I have a question, but I'm sitting here in front of my app since hours but I can't understand what the problem is.</p>
  <p>I have an android app (written in kotlin) and I want to make two product flavors and override a class / file in the product flavor:</p>
  <p>So my gradle script is that:</p>
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'kotlin-android'
  
  
  android {
    ...
    productFlavors {
      foo {
        applicationId &quot;com.foo&quot;
      }
    }
  }
  </code></pre>
  <p>My files are structured as follows:</p>
  <pre><code> - src
      - androidTest
      - foo
        - java
          - com
            - example
              - Bar.kt
      - main
        - java
          - com
            - example
              - Bar.kt
      - test
  </code></pre>
  <p>So basically I would like to override <code>Bar.kt</code> file in <code>foo</code> product flavor, but somehow it doesn't work: It says class Bar is duplicated.</p>
  <p>Any hint?</p>