setup Junit and mockito

Project: http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/commit/29c165e5
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/tree/29c165e5
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/diff/29c165e5

Branch: refs/heads/master
Commit: 29c165e5e18140351530be5e7cde1cfb71047079
Parents: e35e4da
Author: Sagar <[email protected]>
Authored: Sun Dec 4 13:47:17 2016 +0530
Committer: Sagar <[email protected]>
Committed: Sun Dec 4 13:47:17 2016 +0530

----------------------------------------------------------------------
 app/build.gradle | 29 +++++++++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-taverna-mobile/blob/29c165e5/app/build.gradle
----------------------------------------------------------------------
diff --git a/app/build.gradle b/app/build.gradle
index 8eec8d0..75271d5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -18,12 +18,33 @@ android {
         versionName "1.0"
         multiDexEnabled true
     }
+
+    sourceSets {
+        def commonTestDir = 'src/commonTest/java'
+
+        main {
+            java.srcDirs = ['src/main/java']
+        }
+        androidTest {
+            java.srcDirs = ['src/androidTest/java/']
+            java.srcDir commonTestDir
+        }
+        test {
+            java.srcDirs = ['src/test/java/']
+            java.srcDir commonTestDir
+        }
+    }
+
     buildTypes {
         release {
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
         }
     }
+    testOptions {
+        unitTests.returnDefaultValues = true
+    }
+
 }
 repositories {
     jcenter()
@@ -55,7 +76,7 @@ dependencies {
     compile 'io.reactivex:rxandroid:1.2.0'
 // Because RxAndroid releases are few and far between, it is recommended you 
also
 // explicitly depend on RxJava's latest version for bug fixes and new features.
-    compile 'io.reactivex:rxjava:1.1.4'
+    compile 'io.reactivex:rxjava:1.1.5'
 
     compile('org.simpleframework:simple-xml:2.7.+'){
         exclude module: 'stax'
@@ -81,4 +102,8 @@ dependencies {
 
     compile 'com.anton46:stepsview:0.0.2'
 
-}
\ No newline at end of file
+    //Dependencies for JUNit and unit tests.
+    testCompile "junit:junit:4.12"
+    testCompile "org.mockito:mockito-all:1.10.19"
+
+}

Reply via email to