build.gradle 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. implementation "com.github.VictorAlbertos:RxActivityResult:0.4.5-2.x"
  56. // 适配器
  57. implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.50'
  58. implementation 'com.google.android.material:material:1.1.0'
  59. implementation project(path: ':mvp')
  60. implementation project(path: ':network')
  61. implementation project(path: ':common')
  62. debugImplementation 'com.readystatesoftware.chuck:library:1.1.0'
  63. releaseImplementation 'com.readystatesoftware.chuck:library-no-op:1.1.0'
  64. }
  65. aspectjx {
  66. exclude "android.support",'androidx','com.google','com.squareup.leakcanary','com.squareup.leakcanary.core','com.alipay','org.apache','com.tencent'
  67. }