does gradle support excluding source files only for some flavor/buildtype when there is multiple flavor/type?
<p>my source tree:</p>

<pre><code>app/src/main/java/com/example/A.java
app/src/main/java/com/example/B.java
</code></pre>

<p>I want to customizing some specific build using productFlavor or buildType.
But I find that exclude statement in sourceSets affects other productFlavor/buildType too.</p>

<p><strong>example</strong> 1.</p>

<pre><code>productFlavors {
    full {
        sourceSets {
            main {
                java {

                }
            }
        }
    }
    mini {
        sourceSets {
            main {
                java {
                    exclude '**/A.java'
                }
            }
        }
    }
}
</code></pre>

<p>after build, both </p>

<pre><code>  app-mini-release.aar 
</code></pre>

<p>and </p>

<pre><code>  app-full-release.aar 
</code></pre>

<p>are the same.</p>

<p><strong>example</strong> 2:</p>

<pre><code>buildTypes {
    release {
        minifyEnabled true 
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }

    debug {
        sourceSets {
            main {
                java {
                    exclude '**/A.java'
            }
        }
    }
}
</code></pre>

<p>after build, both </p>

<pre><code>app-debug.aar 
</code></pre>

<p>and </p>

<pre><code>app-release.aar 
</code></pre>

<p>contains A.class</p>