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.
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:
So my gradle script is that:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
...
productFlavors {
foo {
applicationId "com.foo"
}
}
}
My files are structured as follows:
- src
- androidTest
- foo
- java
- com
- example
- Bar.kt
- main
- java
- com
- example
- Bar.kt
- test
So basically I would like to override Bar.kt
file in foo
product flavor, but somehow it doesn't work: It says class Bar is duplicated.
Any hint?
Bar.kt
is actually a Dagger 2 module – Derogate