build.gradle 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. }
  55. //aspectjx {
  56. // exclude "android.support",'androidx','com.google','com.squareup.leakcanary','com.squareup.leakcanary.core','com.alipay','org.apache','com.tencent'
  57. //}