build.gradle 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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. dependencies {
  59. implementation fileTree(dir: 'libs', include: ['*.jar'])
  60. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  61. testImplementation 'junit:junit:4.12'
  62. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  63. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  64. api project(path: ':common')
  65. implementation project(path: ':network')
  66. implementation project(path: ':mvp')
  67. //compile "androidx.core:core-ktx:+"
  68. //compile "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
  69. //implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  70. implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
  71. // RxActivityResult
  72. implementation 'com.github.VictorAlbertos:RxActivityResult:0.5.0-2.x'
  73. // 调试过程中可以查看详细的网络请求与相应
  74. debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
  75. releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
  76. // 友盟
  77. implementation "com.umeng.umsdk:common:9.1.0" //(必选)
  78. implementation "com.umeng.umsdk:asms:1.1.3" // asms包依赖(必选)
  79. implementation "com.umeng.umsdk:crash:0.0.4" // native crash包依赖(必选)
  80. // Jsoup解析网页
  81. //implementation 'org.jsoup:jsoup:1.13.1'
  82. // 圆角图片
  83. //implementation 'de.hdodenhof:circleimageview:3.1.0'
  84. implementation 'com.makeramen:roundedimageview:2.3.0'
  85. // 文字对齐
  86. //implementation 'me.codeboy.android:align-text-view:2.3.2'
  87. }
  88. repositories {
  89. mavenCentral()
  90. }