build.gradle 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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 7
  12. versionName "1.7"
  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. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://192.168.0.190/"')
  35. }
  36. rel {
  37. // 正式上线
  38. buildConfigField("String", "BASE_URL", '"http://app.icsmabc.cyou:8856/"')
  39. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://icsmabc.cyou/eden/images/"')
  40. }
  41. company {
  42. // 开发2
  43. buildConfigField("String", "BASE_URL", '"http://10.16.0.153:8080/"')
  44. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://10.16.0.153/"')
  45. }
  46. }
  47. buildTypes {
  48. debug {
  49. }
  50. release {
  51. signingConfig signingConfigs.config
  52. minifyEnabled false
  53. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  54. }
  55. }
  56. // 定义输出的APK名字
  57. android.applicationVariants.all { variant ->
  58. variant.outputs.all {
  59. outputFileName = "Eden_v${defaultConfig.versionName}.apk"
  60. }
  61. }
  62. }
  63. //implementation fileTree(dir: 'libs', include: ['*.jar', '*.aar'])
  64. //增加'*.aar'就不用在android节点写下面的了:
  65. /* repositories {
  66. flatDir {
  67. dirs 'libs'
  68. }
  69. }*/
  70. dependencies {
  71. implementation fileTree(dir: 'libs', include: ['*.jar'])
  72. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  73. testImplementation 'junit:junit:4.12'
  74. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  75. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  76. api project(path: ':common')
  77. implementation project(path: ':network')
  78. implementation project(path: ':mvp')
  79. //compile "androidx.core:core-ktx:+"
  80. //compile "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
  81. //implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  82. implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
  83. // RxActivityResult
  84. implementation 'com.github.VictorAlbertos:RxActivityResult:0.5.0-2.x'
  85. // 调试过程中可以查看详细的网络请求与相应
  86. debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
  87. releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
  88. // 友盟
  89. implementation "com.umeng.umsdk:common:9.1.0" //(必选)
  90. implementation "com.umeng.umsdk:asms:1.1.3" // asms包依赖(必选)
  91. implementation "com.umeng.umsdk:crash:0.0.4" // native crash包依赖(必选)
  92. // Jsoup解析网页
  93. //implementation 'org.jsoup:jsoup:1.13.1'
  94. // 圆角图片
  95. //implementation 'de.hdodenhof:circleimageview:3.1.0'
  96. implementation 'com.makeramen:roundedimageview:2.3.0'
  97. // 文字对齐
  98. //implementation 'me.codeboy.android:align-text-view:2.3.2'
  99. //饺子视频播放器
  100. //implementation (name: 'jiaozivideoplayer-7.4.2', ext: 'aar')
  101. //implementation 'cn.jzvd:jiaozivideoplayer:7.4.2'
  102. // 右划销毁Activity,另外:sockeqwe/SwipeBack也可以参考
  103. //implementation 'com.aitangba:swipeback:1.0.3'
  104. //implementation 'com.hannesdorfmann:swipeback:1.0.4'
  105. //implementation 'com.jude:swipebackhelper:3.1.2'
  106. // 图片点击可以放大缩小
  107. implementation 'com.github.chrisbanes:PhotoView:1.2.6'
  108. implementation 'cn.hutool:hutool-all:5.4.3'
  109. implementation 'com.alibaba:fastjson:1.2.73'
  110. }
  111. repositories {
  112. mavenCentral()
  113. }