react-native-navigation的迁移库

build.gradle 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. apply plugin: 'com.android.library'
  2. apply from: '../prepare-robolectric.gradle'
  3. android {
  4. compileSdkVersion 26
  5. buildToolsVersion '27.0.3'
  6. defaultConfig {
  7. minSdkVersion 19
  8. targetSdkVersion 25
  9. versionCode 1
  10. versionName "1.0"
  11. }
  12. buildTypes {
  13. release {
  14. minifyEnabled false
  15. }
  16. debug {
  17. minifyEnabled false
  18. }
  19. }
  20. lintOptions {
  21. abortOnError false
  22. }
  23. testOptions {
  24. unitTests.all { t ->
  25. reports {
  26. html.enabled true
  27. }
  28. testLogging {
  29. events "PASSED", "SKIPPED", "FAILED", "standardOut", "standardError"
  30. }
  31. afterSuite { desc, result ->
  32. if (!desc.parent) { // will match the outermost suite
  33. def output = " ${result.resultType} (${result.successfulTestCount} successes, ${result.failedTestCount} failures, ${result.skippedTestCount} skipped) "
  34. def repeatLength = output.length()
  35. println '\n\n' + ('-' * repeatLength) + '\n' + output + '\n' + ('-' * repeatLength) + '\n'
  36. println "see report at file://${t.reports.html.destination}/index.html"
  37. }
  38. }
  39. }
  40. }
  41. compileOptions {
  42. sourceCompatibility JavaVersion.VERSION_1_8
  43. targetCompatibility JavaVersion.VERSION_1_8
  44. }
  45. flavorDimensions "RNN.reactNativeVersion"
  46. productFlavors {
  47. reactNative51 {
  48. dimension "RNN.reactNativeVersion"
  49. buildConfigField("int", "REACT_NATVE_VERSION_MINOR", "51")
  50. }
  51. reactNative55 {
  52. dimension "RNN.reactNativeVersion"
  53. buildConfigField("int", "REACT_NATVE_VERSION_MINOR", "55")
  54. }
  55. reactNative56 {
  56. dimension "RNN.reactNativeVersion"
  57. buildConfigField("int", "REACT_NATVE_VERSION_MINOR", "56")
  58. }
  59. reactNative57 {
  60. dimension "RNN.reactNativeVersion"
  61. buildConfigField("int", "REACT_NATVE_VERSION_MINOR", "57")
  62. }
  63. reactNative57_5 {
  64. dimension "RNN.reactNativeVersion"
  65. buildConfigField("int", "REACT_NATVE_VERSION_MINOR", "57")
  66. }
  67. }
  68. }
  69. allprojects { p ->
  70. p.afterEvaluate {
  71. p.android.compileOptions.sourceCompatibility JavaVersion.VERSION_1_8
  72. p.android.compileOptions.targetCompatibility JavaVersion.VERSION_1_8
  73. }
  74. p.repositories {
  75. maven { url "https://jitpack.io" }
  76. }
  77. }
  78. dependencies {
  79. implementation fileTree(include: ['*.jar'], dir: 'libs')
  80. implementation 'com.android.support:design:26.1.0'
  81. implementation 'com.android.support:appcompat-v7:26.1.0'
  82. implementation 'com.android.support:support-v4:26.1.0'
  83. implementation 'com.github.wix-playground:ahbottomnavigation:2.4.5'
  84. implementation 'com.github.wix-playground:reflow-animator:1.0.4'
  85. implementation 'com.github.clans:fab:1.6.4'
  86. //noinspection GradleDynamicVersion
  87. implementation 'com.facebook.react:react-native:+'
  88. // tests
  89. testImplementation 'junit:junit:4.12'
  90. testImplementation 'org.robolectric:robolectric:3.5.1'
  91. testImplementation 'org.assertj:assertj-core:3.8.0'
  92. testImplementation 'com.squareup.assertj:assertj-android:1.1.1'
  93. testImplementation 'org.mockito:mockito-core:2.13.0'
  94. }