build.gradle 3.6 KB

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