build.gradle 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. }
  21. }
  22. compileOptions {
  23. sourceCompatibility JavaVersion.VERSION_1_8
  24. targetCompatibility JavaVersion.VERSION_1_8
  25. }
  26. // 开发与发布的URL
  27. flavorDimensions "url"
  28. productFlavors {
  29. dev {
  30. // 开发环境宿舍服务器
  31. buildConfigField("String", "BASE_URL", '"http://192.168.0.190:8080/"')
  32. }
  33. rel {
  34. // 正式上线
  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. }
  43. dependencies {
  44. implementation fileTree(dir: "libs", include: ["*.jar"])
  45. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  46. implementation 'androidx.core:core-ktx:1.3.2'
  47. implementation 'androidx.appcompat:appcompat:1.2.0'
  48. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  49. testImplementation 'junit:junit:4.12'
  50. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  51. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  52. compile 'org.aspectj:aspectjrt:1.8.+'
  53. // 动态权限申请firefly1126/android_permission_aspectjx
  54. compile 'com.firefly1126.permissionaspect:permissionaspect:1.0.1'
  55. // 适配器
  56. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
  57. implementation 'com.google.android.material:material:1.1.0'
  58. implementation project(path: ':mvp')
  59. implementation project(path: ':network')
  60. implementation project(path: ':common')
  61. }
  62. aspectjx {
  63. exclude "android.support",'androidx','com.google','com.squareup.leakcanary','com.squareup.leakcanary.core','com.alipay','org.apache','com.tencent'
  64. }