瀏覽代碼

fix robolectric

Daniel Zlotin 8 年之前
父節點
當前提交
d33f963455
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7
    7
      android/prepare-robolectric.gradle

+ 7
- 7
android/prepare-robolectric.gradle 查看文件

1
-def robolectricDependenciesFolder = new File(gradle.gradleUserHomeDir, "/robolectric-dependencies-3.2.2")
1
+def robolectricDependenciesFolder = new File(rootProject.buildDir, "robolectric-3.2.2-dependencies")
2
 
2
 
3
 configurations.create('robolectricRuntime')
3
 configurations.create('robolectricRuntime')
4
 
4
 
8
 }
8
 }
9
 
9
 
10
 rootProject.task(type: Copy, overwrite: true, "downloadRobolectricDependencies") {
10
 rootProject.task(type: Copy, overwrite: true, "downloadRobolectricDependencies") {
11
-    println "downloadRobolectricDependencies " + robolectricDependenciesFolder
11
+    println "downloadRobolectricDependencies into " + robolectricDependenciesFolder
12
     from configurations.robolectricRuntime
12
     from configurations.robolectricRuntime
13
     into robolectricDependenciesFolder
13
     into robolectricDependenciesFolder
14
 }
14
 }
15
 
15
 
16
 project.afterEvaluate {
16
 project.afterEvaluate {
17
-  tasks.all {
18
-      if (it.name.startsWith("test")) {
19
-          it.dependsOn(rootProject.tasks.findByName("downloadRobolectricDependencies"))
20
-      }
21
-  }
17
+    tasks.all {
18
+        if (it.name.startsWith("test")) {
19
+            it.dependsOn(rootProject.tasks.findByName("downloadRobolectricDependencies"))
20
+        }
21
+    }
22
 }
22
 }
23
 
23
 
24
 android {
24
 android {