jeudi 2 avril 2015

Gradle: Override Class from main sourceSet in Test sourceSet

I have a Modules class that provides Dagger modules. When running my Unit Tests and androidTests, I would like to override this class, similar to how you can override classes for different build types or flavors.


Is this possible? Currently I am getting a Duplicate class file found error when I try to have a class in my test sourceSet that has the same qualified name as the corresponding class in the main sourceSet.


Ultimately, I want to provide the database a little differently during unit tests.


Aucun commentaire:

Enregistrer un commentaire