Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update:</strong> Jake Wharton just announced the <a href="https://github.com/square/gradle-android-test-plugin"><code>gradle-android-test-plugin</code></a>. You can find it at <a href="https://github.com/square/gradle-android-test-plugin">https://github.com/square/gradle-android-test-plugin</a></p> <p>It seems to be pretty streamlined, especially if you plan to use <code>robolectric</code>.</p> <hr> <p><strong>Old Answer Below</strong></p> <p>The <a href="https://github.com/novoda/robolectric-plugin"><code>robolectric-plugin</code></a> looks promising.</p> <p>The sample <code>build.gradle</code> file they provide is :</p> <pre><code>buildscript { repositories { mavenCentral() maven { url "https://oss.sonatype.org/content/repositories/snapshots" } } dependencies { classpath 'com.android.tools.build:gradle:0.4.2' classpath 'com.novoda.gradle:robolectric-plugin:0.0.1-SNAPSHOT' } } apply plugin: 'android' apply plugin: 'robolectric' repositories { mavenCentral() mavenLocal() maven { url "https://oss.sonatype.org/content/repositories/snapshots" } } dependencies { //compile files('libs/android-support-v4.jar') // had to deploy to sonatype to get AAR to work compile 'com.novoda:actionbarsherlock:4.3.2-SNAPSHOT' robolectricCompile 'org.robolectric:robolectric:2.0' robolectricCompile group: 'junit', name: 'junit', version: '4.+' } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 7 targetSdkVersion 17 } } </code></pre> <p>It doesn't seem to work with the Android Gradle plugin version 0.5 but maybe it will soon.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload