react-native-navigation的迁移库

build.gradle 3.8KB

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