build.gradle 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://192.168.0.190/"')
  33. }
  34. rel {
  35. // 正式上线
  36. buildConfigField("String", "BASE_URL", '"http://app.icsmabc.cyou:8856/"')
  37. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://icsmabc.cyou/eden/images/"')
  38. }
  39. company {
  40. // 开发2
  41. buildConfigField("String", "BASE_URL", '"http://10.16.0.153:8080/"')
  42. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://10.16.0.153/"')
  43. }
  44. }
  45. }
  46. dependencies {
  47. implementation fileTree(dir: "libs", include: ["*.jar"])
  48. implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
  49. implementation 'androidx.core:core-ktx:1.3.2'
  50. implementation 'androidx.appcompat:appcompat:1.2.0'
  51. implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  52. testImplementation 'junit:junit:4.12'
  53. androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  54. androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  55. compile 'org.aspectj:aspectjrt:1.8.+'
  56. // 动态权限申请firefly1126/android_permission_aspectjx
  57. compile 'com.firefly1126.permissionaspect:permissionaspect:1.0.1'
  58. // 适配器
  59. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
  60. implementation 'com.google.android.material:material:1.1.0'
  61. implementation project(path: ':mvp')
  62. implementation project(path: ':network')
  63. implementation project(path: ':common')
  64. }
  65. aspectjx {
  66. exclude "android.support",'androidx','com.google','com.squareup.leakcanary','com.squareup.leakcanary.core','com.alipay','org.apache','com.tencent'
  67. }