build.gradle 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. }