react-native-navigation的迁移库

build.gradle 2.0KB

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