build.gradle 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. apply plugin: 'com.android.application'
  2. apply plugin: 'com.hujiang.android-aspectjx'
  3. android {
  4. compileSdkVersion versions.compileSdk
  5. buildToolsVersion versions.buildTools
  6. defaultConfig {
  7. applicationId "com.miekir.newmvp"
  8. minSdkVersion versions.minSdk
  9. targetSdkVersion versions.targetSdk
  10. versionCode 1
  11. versionName "1.0"
  12. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  13. }
  14. buildTypes {
  15. release {
  16. minifyEnabled false
  17. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  18. }
  19. }
  20. compileOptions {
  21. sourceCompatibility JavaVersion.VERSION_1_8
  22. targetCompatibility JavaVersion.VERSION_1_8
  23. }
  24. // 开发与发布的URL
  25. flavorDimensions "url"
  26. productFlavors {
  27. dev {
  28. // 开发环境宿舍服务器
  29. buildConfigField("String", "BASE_URL", '"http://192.168.0.190:8080/"')
  30. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://192.168.0.190/"')
  31. }
  32. rel {
  33. // 正式上线
  34. buildConfigField("String", "BASE_URL", '"http://app.icsmabc.cyou:8856/"')
  35. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://icsmabc.cyou/eden/images/"')
  36. }
  37. company {
  38. // 开发2
  39. buildConfigField("String", "BASE_URL", '"http://10.16.0.153:8080/"')
  40. buildConfigField("String", "HOST_STATIC_RESOURCE_IMAGE", '"http://10.16.0.153/"')
  41. }
  42. }
  43. }
  44. dependencies {
  45. implementation fileTree(dir: 'libs', include: ['*.jar'])
  46. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  47. implementation project(path: ':network')
  48. testImplementation 'junit:junit:4.12'
  49. androidTestImplementation 'androidx.test.ext:junit:1.1.0'
  50. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  51. implementation project(path: ':common')
  52. implementation project(path: ':mvp')
  53. compile 'org.aspectj:aspectjrt:1.8.+'
  54. // 动态权限申请firefly1126/android_permission_aspectjx
  55. compile 'com.firefly1126.permissionaspect:permissionaspect:1.0.1'
  56. }
  57. aspectjx {
  58. exclude "android.support",'androidx','com.google','com.squareup.leakcanary','com.squareup.leakcanary.core','com.alipay','org.apache','com.tencent'
  59. }