react-native-navigation的迁移库

prepare-robolectric.gradle 1021B

12345678910111213141516171819202122232425262728293031323334
  1. def robolectricDependenciesFolder = new File(rootProject.buildDir, "robolectric-3.2.2-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:shadows-core:3.2.2"
  7. }
  8. rootProject.task(type: Copy, overwrite: true, "downloadRobolectricDependencies") {
  9. println "downloadRobolectricDependencies into " + robolectricDependenciesFolder
  10. from configurations.robolectricRuntime
  11. into robolectricDependenciesFolder
  12. }
  13. project.afterEvaluate {
  14. tasks.all {
  15. if (it.name.startsWith("test")) {
  16. it.dependsOn(rootProject.tasks.findByName("downloadRobolectricDependencies"))
  17. }
  18. }
  19. }
  20. android {
  21. testOptions {
  22. unitTests.all {
  23. systemProperty 'robolectric.offline', 'true'
  24. systemProperty 'robolectric.dependency.dir', robolectricDependenciesFolder
  25. }
  26. }
  27. }