react-native-navigation的迁移库

prepare-robolectric.gradle 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. def robolectricDependenciesFolder = rootProject.buildDir.path + "/robolectric-dependencies"
  2. configurations.create('robolectricRuntime')
  3. dependencies {
  4. robolectricRuntime "org.ccil.cowan.tagsoup:tagsoup:1.2"
  5. robolectricRuntime "org.robolectric:android-all:6.0.0_r1-robolectric-0"
  6. robolectricRuntime "org.robolectric:shadows-core-v23:3.1.4"
  7. robolectricRuntime "org.json:json:20080701"
  8. }
  9. rootProject.task(type: Copy, overwrite: true, "downloadRobolectricDependencies") {
  10. println "downloadRobolectricDependencies " + robolectricDependenciesFolder
  11. from configurations.robolectricRuntime
  12. into robolectricDependenciesFolder
  13. }
  14. project.afterEvaluate {
  15. tasks.all {
  16. if (it.name.startsWith("test")) {
  17. it.dependsOn(rootProject.tasks.findByName("downloadRobolectricDependencies"))
  18. }
  19. }
  20. }
  21. android {
  22. testOptions {
  23. unitTests.all {
  24. systemProperty 'robolectric.offline', 'true'
  25. systemProperty 'robolectric.dependency.dir', robolectricDependenciesFolder
  26. }
  27. }
  28. }