build.gradle 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. apply plugin: 'com.android.application'
  2. //apply plugin: 'kotlin-android-extensions'
  3. //apply plugin: 'kotlin-android'
  4. android {
  5. compileSdkVersion versions.compileSdk
  6. buildToolsVersion versions.buildTools
  7. defaultConfig {
  8. minSdkVersion versions.minSdk
  9. targetSdkVersion versions.targetSdk
  10. applicationId "com.miekir.eden"
  11. versionCode 5
  12. versionName "1.5"
  13. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  14. // 支持64位架构(上架谷歌市场必要条件),'x86_64','x86'
  15. ndk.abiFilters 'armeabi-v7a','arm64-v8a'
  16. }
  17. compileOptions {
  18. sourceCompatibility JavaVersion.VERSION_1_8
  19. targetCompatibility JavaVersion.VERSION_1_8
  20. }
  21. signingConfigs {
  22. config {
  23. storeFile file('commonkey')
  24. storePassword "away6899458"
  25. keyAlias "sz"
  26. keyPassword "away6899458"
  27. }
  28. }
  29. flavorDimensions "url"
  30. productFlavors {
  31. dev {
  32. // 开发环境宿舍服务器
  33. buildConfigField("String", "BASE_URL", '"http://192.168.0.190:8080/"')
  34. }
  35. rel {
  36. // 正式上线
  37. buildConfigField("String", "BASE_URL", '"http://app.jianjie.life:11111/"')
  38. }
  39. company {
  40. // 开发2
  41. buildConfigField("String", "BASE_URL", '"http://10.16.0.184:8080/"')
  42. }
  43. }
  44. buildTypes {
  45. debug {
  46. }
  47. release {
  48. signingConfig signingConfigs.config
  49. minifyEnabled false
  50. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  51. }
  52. }
  53. // 定义输出的APK名字
  54. android.applicationVariants.all { variant ->
  55. variant.outputs.all {
  56. outputFileName = "Shibei_v${defaultConfig.versionName}.apk"
  57. }
  58. }
  59. }
  60. //implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
  61. //增加'*.aar'就不用在android节点写下面的了:
  62. /* repositories {
  63. flatDir {
  64. dirs 'libs'
  65. }
  66. }*/
  67. dependencies {
  68. implementation fileTree(dir: 'libs', include: ['*.jar'])
  69. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  70. testImplementation 'junit:junit:4.12'
  71. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  72. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  73. api project(path: ':common')
  74. implementation project(path: ':network')
  75. implementation project(path: ':mvp')
  76. //compile "androidx.core:core-ktx:+"
  77. //compile "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
  78. //implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  79. implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
  80. // RxActivityResult
  81. implementation 'com.github.VictorAlbertos:RxActivityResult:0.5.0-2.x'
  82. // 调试过程中可以查看详细的网络请求与相应
  83. debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
  84. releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
  85. // 友盟
  86. implementation "com.umeng.umsdk:common:9.1.0" //(必选)
  87. implementation "com.umeng.umsdk:asms:1.1.3" // asms包依赖(必选)
  88. implementation "com.umeng.umsdk:crash:0.0.4" // native crash包依赖(必选)
  89. // Jsoup解析网页
  90. //implementation 'org.jsoup:jsoup:1.13.1'
  91. // 圆角图片
  92. //implementation 'de.hdodenhof:circleimageview:3.1.0'
  93. implementation 'com.makeramen:roundedimageview:2.3.0'
  94. // 文字对齐
  95. //implementation 'me.codeboy.android:align-text-view:2.3.2'
  96. //饺子视频播放器
  97. //implementation (name: 'jiaozivideoplayer-7.4.2', ext: 'aar')
  98. implementation 'cn.jzvd:jiaozivideoplayer:7.4.2'
  99. }
  100. repositories {
  101. mavenCentral()
  102. }