Setup: Android Studio 3b6, Kotlin (1.1.4-3), Gradle (plugin 3.0.0-beta6), JUnit4, Data binding
Problem: When running my JUnit tests with ./gradlew test all tests succeed except the ones that test my viewmodels. The viewmodels are implemented using googles databinding library.
java.lang.SecurityException: class "android.databinding.BaseObservable"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:898)
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:668)
When running the tests from within Android Studio there is no problem.
Any ideas on how to solve this issue?