react-native-navigation的迁移库

build.gradle 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. apply plugin: "com.android.application"
  2. project.ext.react = [
  3. root : "../../../",
  4. entryFile: "index.js",
  5. bundleAssetName: "index.android.bundle",
  6. bundleInAlpha: true,
  7. bundleInBeta: true
  8. ]
  9. apply from: "../../../node_modules/react-native/react.gradle"
  10. android {
  11. compileSdkVersion 28
  12. ndkVersion "20.1.5948944"
  13. compileOptions {
  14. sourceCompatibility JavaVersion.VERSION_1_8
  15. targetCompatibility JavaVersion.VERSION_1_8
  16. }
  17. defaultConfig {
  18. applicationId "com.reactnativenavigation.playground"
  19. minSdkVersion 21
  20. targetSdkVersion 28
  21. versionCode 1
  22. versionName "1.0"
  23. ndk {
  24. abiFilters "armeabi-v7a", "x86"
  25. }
  26. testBuildType System.getProperty('testBuildType', 'debug')
  27. testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
  28. }
  29. signingConfigs {
  30. release {
  31. storeFile file('../playground.keystore')
  32. storePassword "playground"
  33. keyAlias "playground"
  34. keyPassword "playground"
  35. }
  36. }
  37. buildTypes {
  38. release {
  39. signingConfig signingConfigs.release
  40. }
  41. }
  42. packagingOptions {
  43. pickFirst '**/libjsc.so'
  44. pickFirst '**/libc++_shared.so'
  45. }
  46. }
  47. dependencies {
  48. implementation fileTree(dir: 'libs', include: ['*.jar'])
  49. implementation 'com.google.android.material:material:1.0.0'
  50. implementation 'androidx.appcompat:appcompat:1.1.0'
  51. //noinspection GradleDynamicVersion
  52. implementation 'com.facebook.react:react-native:+'
  53. //noinspection GradleDynamicVersion
  54. implementation 'org.webkit:android-jsc-intl:+'
  55. implementation project(':react-native-navigation')
  56. androidTestImplementation('com.wix:detox:+') { transitive = true }
  57. androidTestImplementation 'junit:junit:4.12'
  58. }
  59. task copyDownloadableDepsToLibs(type: Copy) {
  60. from configurations.compile
  61. into 'libs'
  62. }
  63. apply from: file("../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle")
  64. applyNativeModulesAppBuildGradle(project)