react-native-navigation的迁移库

build.gradle 1.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. apply plugin: "com.android.application"
  2. apply from: "../../node_modules/react-native/react.gradle"
  3. android {
  4. compileSdkVersion 25
  5. buildToolsVersion "25.0.2"
  6. defaultConfig {
  7. applicationId "com.example"
  8. minSdkVersion 16
  9. targetSdkVersion 25
  10. versionCode 1
  11. versionName "1.0"
  12. ndk {
  13. abiFilters "armeabi-v7a", "x86"
  14. }
  15. }
  16. splits {
  17. abi {
  18. reset()
  19. enable false
  20. universalApk false // If true, also generate a universal APK
  21. include "armeabi-v7a", "x86"
  22. }
  23. }
  24. buildTypes {
  25. release {
  26. minifyEnabled false
  27. proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
  28. }
  29. }
  30. // applicationVariants are e.g. debug, release
  31. applicationVariants.all { variant ->
  32. variant.outputs.each { output ->
  33. // For each separate APK per architecture, set a unique version code as described here:
  34. // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
  35. def versionCodes = ["armeabi-v7a": 1, "x86": 2]
  36. def abi = output.getFilter(OutputFile.ABI)
  37. if (abi != null) { // null for the universal-debug, universal-release variants
  38. output.versionCodeOverride =
  39. versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
  40. }
  41. }
  42. }
  43. }
  44. dependencies {
  45. compile fileTree(dir: 'libs', include: ['*.jar'])
  46. compile 'com.facebook.react:react-native:+'
  47. compile project(':react-native-navigation')
  48. }