react-native-navigation的迁移库

prepare-robolectric.gradle 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. def robolectricDependenciesFolder = new File(rootProject.buildDir, "robolectric-3.3-dependencies")
  2. configurations.create('robolectricRuntime')
  3. dependencies {
  4. testCompile "org.khronos:opengl-api:gl1.1-android-2.1_r1"
  5. robolectricRuntime "org.robolectric:android-all:7.1.0_r7-robolectric-0"
  6. robolectricRuntime "org.robolectric:shadows-core:3.3"
  7. robolectricRuntime "org.robolectric:robolectric-utils:3.3"
  8. robolectricRuntime "org.robolectric:robolectric-resources:3.3"
  9. robolectricRuntime "org.robolectric:robolectric-processor:3.3"
  10. robolectricRuntime "org.robolectric:robolectric-sandbox:3.3"
  11. robolectricRuntime "org.robolectric:shadows-support-v4:3.3"
  12. robolectricRuntime "org.robolectric:shadows-multidex:3.3"
  13. robolectricRuntime "org.robolectric:shadows-play-services:3.3"
  14. robolectricRuntime "org.robolectric:shadows-maps:3.3"
  15. }
  16. rootProject.task(type: Copy, overwrite: true, "downloadRobolectricDependencies") {
  17. println "downloadRobolectricDependencies into " + robolectricDependenciesFolder
  18. from configurations.robolectricRuntime
  19. into robolectricDependenciesFolder
  20. }
  21. project.afterEvaluate {
  22. tasks.all {
  23. if (it.name.startsWith("test")) {
  24. it.dependsOn(rootProject.tasks.findByName("downloadRobolectricDependencies"))
  25. }
  26. }
  27. }
  28. android {
  29. testOptions {
  30. unitTests.all {
  31. systemProperty 'robolectric.offline', 'true'
  32. systemProperty 'robolectric.dependency.dir', robolectricDependenciesFolder
  33. }
  34. }
  35. }