react-native-navigation的迁移库

prepare-robolectric.gradle 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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:6.0.1_r3-robolectric-0"
  6. robolectricRuntime "org.robolectric:android-all:7.1.0_r7-robolectric-0"
  7. robolectricRuntime "org.robolectric:shadows-core:3.3"
  8. robolectricRuntime "org.robolectric:robolectric-utils:3.3"
  9. robolectricRuntime "org.robolectric:robolectric-resources:3.3"
  10. robolectricRuntime "org.robolectric:robolectric-processor:3.3"
  11. robolectricRuntime "org.robolectric:robolectric-sandbox:3.3"
  12. robolectricRuntime "org.robolectric:shadows-support-v4:3.3"
  13. robolectricRuntime "org.robolectric:shadows-multidex:3.3"
  14. robolectricRuntime "org.robolectric:shadows-play-services:3.3"
  15. robolectricRuntime "org.robolectric:shadows-maps:3.3"
  16. }
  17. rootProject.task(type: Copy, overwrite: true, "downloadRobolectricDependencies") {
  18. println "downloadRobolectricDependencies into " + robolectricDependenciesFolder
  19. from configurations.robolectricRuntime
  20. into robolectricDependenciesFolder
  21. }
  22. project.afterEvaluate {
  23. tasks.all {
  24. if (it.name.startsWith("test")) {
  25. it.dependsOn(rootProject.tasks.findByName("downloadRobolectricDependencies"))
  26. }
  27. }
  28. }
  29. android {
  30. testOptions {
  31. unitTests.all {
  32. systemProperty 'robolectric.offline', 'true'
  33. systemProperty 'robolectric.dependency.dir', robolectricDependenciesFolder
  34. }
  35. }
  36. }