Add robolectric and gradle android test plugin

pull/46/head
Alex Baker 11 years ago
parent 69829e3f68
commit e2268f8720

@ -1,16 +1,24 @@
buildscript {
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.squareup.gradle:gradle-android-test-plugin:0.9.1-SNAPSHOT'
}
}
apply plugin: 'android'
apply plugin: 'android-test'
repositories {
mavenCentral()
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}
android {
@ -80,4 +88,10 @@ dependencies {
compile group: 'com.google.http-client', name: 'google-http-client-extensions-android3', version: '1.6.0-beta', transitive: false
compile group: 'com.google.oauth-client', name: 'google-oauth-client', version: '1.6.0-beta', transitive: false
compile group: 'com.google.oauth-client', name: 'google-oauth-client-extensions', version: '1.6.0-beta', transitive: false
testCompile 'junit:junit:4.10'
testCompile 'org.robolectric:robolectric:2.3-SNAPSHOT'
// hack to get android studio to import libraries
instrumentTestCompile 'junit:junit:4.10'
instrumentTestCompile 'org.robolectric:robolectric:2.3-SNAPSHOT'
}

@ -599,14 +599,6 @@
<service android:name="com.todoroo.astrid.reminders.ReminderSchedulingService" />
<!-- other task actions -->
<receiver android:name="com.todoroo.astrid.core.LinkActionExposer">
<intent-filter>
<action android:name="org.tasks.REQUEST_ACTIONS" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<!-- Uses Library -->
<uses-library
android:name="com.google.android.maps"

@ -0,0 +1,12 @@
package org.tasks;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
@RunWith(RobolectricTestRunner.class)
public class SampleTest {
@Test
public void SomeTest() {
}
}
Loading…
Cancel
Save