build.gradle 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. plugins {
  2. id 'com.android.application'
  3. id 'org.jetbrains.kotlin.android'
  4. id 'kotlin-android-extensions'
  5. id 'kotlin-kapt'
  6. }
  7. kapt {
  8. arguments {
  9. arg("AROUTER_MODULE_NAME", project.getName())
  10. }
  11. }
  12. //多渠道打包
  13. apply plugin: 'walle'
  14. def appId = "com.yingyangfly"
  15. android {
  16. signingConfigs {
  17. debug {
  18. storeFile file(RELEASE_STOREFILE)
  19. storePassword RELEASE_STORE_PASSWORD
  20. keyAlias RELEASE_KEY_ALIAS
  21. keyPassword RELEASE_KEY_PASSWORD
  22. }
  23. release {
  24. storeFile file(RELEASE_STOREFILE)
  25. storePassword RELEASE_STORE_PASSWORD
  26. keyAlias RELEASE_KEY_ALIAS
  27. keyPassword RELEASE_KEY_PASSWORD
  28. }
  29. }
  30. compileSdkVersion rootProject.ext.android.compileSdkVersion
  31. defaultConfig {
  32. applicationId appId
  33. minSdkVersion rootProject.ext.android.minSdkVersion
  34. targetSdkVersion rootProject.ext.android.targetSdkVersion
  35. versionCode rootProject.ext.android.versionCode
  36. versionName rootProject.ext.android.versionName
  37. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  38. vectorDrawables.useSupportLibrary = true
  39. multiDexEnabled true
  40. // 只保留指定和默认的资源
  41. resConfigs "zh"//去掉无用的国际语言
  42. ndkVersion '22.1.7171670'
  43. ndk {
  44. //选择要添加的对应 cpu 类型的 .so 库。
  45. abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
  46. // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
  47. }
  48. manifestPlaceholders = [
  49. JPUSH_PKGNAME: applicationId,
  50. JPUSH_APPKEY : "d353d35b7a05a9d6a353c33e", //JPush 上注册的包名对应的 Appkey.
  51. JPUSH_CHANNEL: "developer-default", //暂时填写默认值即可.
  52. ]
  53. }
  54. buildTypes {
  55. debug {
  56. minifyEnabled false // 打开混淆
  57. shrinkResources false // 是否清理无用资源,依赖于minifyEnabled
  58. zipAlignEnabled false // 是否启用zipAlign压缩
  59. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  60. signingConfig signingConfigs.debug
  61. debuggable true
  62. resValue "string", "app_name", "鹰扬科技dev"
  63. manifestPlaceholders = [ENVIRONMENT: "appdebug",
  64. app_icon : "@mipmap/ic_launcher", package_name: appId]
  65. }
  66. release {
  67. minifyEnabled false // 打开混淆
  68. shrinkResources false // 是否清理无用资源,依赖于minifyEnabled
  69. zipAlignEnabled false // 是否启用zipAlign压缩
  70. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  71. signingConfig signingConfigs.release
  72. debuggable true
  73. resValue "string", "app_name", "鹰扬科技"
  74. manifestPlaceholders = [ENVIRONMENT: "appdebug",
  75. app_icon : "@mipmap/ic_launcher", package_name: appId]
  76. }
  77. }
  78. compileOptions {
  79. sourceCompatibility JavaVersion.VERSION_1_8
  80. targetCompatibility JavaVersion.VERSION_1_8
  81. }
  82. kotlinOptions {
  83. jvmTarget = '1.8'
  84. }
  85. lintOptions {
  86. checkReleaseBuilds false
  87. abortOnError false
  88. }
  89. buildFeatures {
  90. dataBinding true
  91. }
  92. }
  93. dependencies {
  94. implementation project(path: ':baselib')
  95. implementation project(path: ':webview')
  96. implementation project(path: ':setting')
  97. implementation project(path: ':workbenches')
  98. implementation project(path: ':speech')
  99. implementation project(path: ':personalcenter')
  100. implementation project(path: ':livebroadcast')
  101. implementation project(path: ':login')
  102. implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
  103. implementation(rootProject.ext.androidx.kotlin_lib)
  104. implementation(rootProject.ext.androidx.kotlin_core)
  105. implementation(rootProject.ext.androidx.appcompat)
  106. implementation(rootProject.ext.androidx.material)
  107. implementation(rootProject.ext.androidx.constraintlayout)
  108. testApi(rootProject.ext.androidx.junit)
  109. androidTestApi(rootProject.ext.androidx.runner)
  110. androidTestApi(rootProject.ext.androidx.espresso_core)
  111. // 此处以JPush 5.0.0 版本为例,5.0.0 版本开始可以自动拉取 JCore 包,无需另外配置
  112. implementation (rootProject.ext.dependencies.jpush)
  113. }