build.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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://188.168.0.190:8080"')
  36. }
  37. }
  38. buildTypes {
  39. debug {
  40. }
  41. release {
  42. signingConfig signingConfigs.config
  43. minifyEnabled false
  44. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  45. }
  46. }
  47. // 定义输出的APK名字
  48. android.applicationVariants.all { variant ->
  49. variant.outputs.all {
  50. outputFileName = "Shibei_v${defaultConfig.versionName}.apk"
  51. }
  52. }
  53. }
  54. dependencies {
  55. implementation fileTree(dir: 'libs', include: ['*.jar'])
  56. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  57. testImplementation 'junit:junit:4.12'
  58. androidTestImplementation 'androidx.test.ext:junit:1.1.1'
  59. androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
  60. api project(path: ':common')
  61. implementation project(path: ':network')
  62. implementation project(path: ':mvp')
  63. //compile "androidx.core:core-ktx:+"
  64. //compile "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0"
  65. //implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
  66. implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
  67. // RxActivityResult
  68. implementation 'com.github.VictorAlbertos:RxActivityResult:0.5.0-2.x'
  69. // 调试过程中可以查看详细的网络请求与相应
  70. debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
  71. releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
  72. // 友盟
  73. implementation "com.umeng.umsdk:common:9.1.0" //(必选)
  74. implementation "com.umeng.umsdk:asms:1.1.3" // asms包依赖(必选)
  75. implementation "com.umeng.umsdk:crash:0.0.4" // native crash包依赖(必选)
  76. // Jsoup解析网页
  77. //implementation 'org.jsoup:jsoup:1.13.1'
  78. }
  79. repositories {
  80. mavenCentral()
  81. }