build.gradle 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'kotlin-android'
  3. apply plugin: 'kotlin-android-extensions'
  4. apply plugin: 'com.hujiang.android-aspectjx'
  5. android {
  6. compileSdkVersion versions.compileSdk
  7. buildToolsVersion versions.buildTools
  8. defaultConfig {
  9. applicationId "com.miekir.ym"
  10. minSdkVersion versions.minSdk
  11. targetSdkVersion versions.targetSdk
  12. versionCode 1
  13. versionName "1.0"
  14. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  15. }
  16. buildTypes {
  17. release {
  18. minifyEnabled false
  19. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  20. buildConfigField("boolean", "IS_DEBUG_MODE", "false")
  21. }
  22. debug {
  23. minifyEnabled false
  24. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  25. buildConfigField("boolean", "IS_DEBUG_MODE", "true")
  26. }
  27. }
  28. compileOptions {
  29. sourceCompatibility JavaVersion.VERSION_1_8
  30. targetCompatibility JavaVersion.VERSION_1_8
  31. }
  32. // 开发与发布的URL
  33. flavorDimensions "url"
  34. productFlavors {
  35. dev {
  36. // 开发环境宿舍服务器
  37. buildConfigField("String", "BASE_URL", '"http://192.168.0.190:8080/"')
  38. }
  39. rel {
  40. // 正式上线
  41. buildConfigField("String", "BASE_URL", '"http://app.jianjie.life:11111/"')
  42. }
  43. company {
  44. // 开发2
  45. buildConfigField("String", "BASE_URL", '"http://10.16.0.184:8080/"')
  46. }
  47. }
  48. }
  49. dependencies {
  50. implementation fileTree(dir: "libs", include: ["*.jar"])
  51. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  52. implementation 'androidx.core:core-ktx:1.3.2'
  53. implementation 'androidx.appcompat:appcompat:1.2.0'
  54. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  55. testImplementation 'junit:junit:4.12'
  56. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  57. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  58. compile 'org.aspectj:aspectjrt:1.8.+'
  59. // 动态权限申请firefly1126/android_permission_aspectjx
  60. compile 'com.firefly1126.permissionaspect:permissionaspect:1.0.1'
  61. implementation "com.github.VictorAlbertos:RxActivityResult:0.4.5-2.x"
  62. // 适配器
  63. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
  64. implementation 'com.google.android.material:material:1.1.0'
  65. implementation project(path: ':mvp')
  66. implementation project(path: ':network')
  67. implementation project(path: ':common')
  68. debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
  69. releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
  70. }
  71. aspectjx {
  72. exclude "android.support",'androidx','com.google','com.squareup.leakcanary','com.squareup.leakcanary.core','com.alipay','org.apache','com.tencent'
  73. }