build.gradle 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. debug {
  16. minifyEnabled false
  17. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  18. buildConfigField("boolean", "IS_DEBUG", 'true')
  19. }
  20. release {
  21. minifyEnabled false
  22. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  23. buildConfigField("boolean", "IS_DEBUG", 'false')
  24. }
  25. }
  26. compileOptions {
  27. sourceCompatibility JavaVersion.VERSION_1_8
  28. targetCompatibility JavaVersion.VERSION_1_8
  29. }
  30. // 开发与发布的URL
  31. flavorDimensions "url"
  32. productFlavors {
  33. dev {
  34. // 开发环境宿舍服务器
  35. buildConfigField("String", "BASE_URL", '"http://192.168.0.190:1935/"')
  36. }
  37. rel {
  38. // 正式上线
  39. buildConfigField("String", "BASE_URL", '"http://app.jianjie.life:11111/"')
  40. }
  41. company {
  42. // 开发2
  43. buildConfigField("String", "BASE_URL", '"http://10.16.0.184:8080/"')
  44. }
  45. }
  46. }
  47. dependencies {
  48. implementation fileTree(dir: 'libs', include: ['*.jar'])
  49. implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
  50. implementation project(path: ':network')
  51. testImplementation 'junit:junit:4.12'
  52. androidTestImplementation 'androidx.test.ext:junit:1.1.0'
  53. androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
  54. implementation project(path: ':common')
  55. implementation project(path: ':mvp')
  56. // compile 'org.aspectj:aspectjrt:1.8.+'
  57. // 动态权限申请firefly1126/android_permission_aspectjx
  58. // compile 'com.firefly1126.permissionaspect:permissionaspect:1.0.1'
  59. }
  60. //aspectjx {
  61. // exclude "android.support",'androidx','com.google','com.squareup.leakcanary','com.squareup.leakcanary.core','com.alipay','org.apache','com.tencent'
  62. //}