react-native-navigation的迁移库

prepare-robolectric.gradle 1.4KB

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