title: Gradle + JUnit + Android Databinding
body: <p><strong>Setup:</strong> Android Studio 3b6, Kotlin (1.1.4-3), Gradle (plugin 3.0.0-beta6), JUnit4, Data binding</p>
  
  <p><strong>Problem:</strong> When running my JUnit tests with ./gradlew test all tests succeed except the ones that test my viewmodels. The viewmodels are implemented using <a href="https://developer.android.com/topic/libraries/data-binding/index.html" rel="nofollow noreferrer">googles databinding library</a>.</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>When running the tests from within Android Studio there is no problem.</p>
  
  <p>Any ideas on how to solve this issue?</p>