build.gradle 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. apply plugin: 'com.android.library'
  2. apply plugin: 'kotlin-android-extensions'
  3. apply plugin: 'kotlin-android'
  4. android {
  5. compileSdkVersion rootProject.ext.compileSdkVersion
  6. buildToolsVersion rootProject.ext.buildToolsVersion
  7. defaultConfig {
  8. minSdkVersion rootProject.ext.minSdkVersion
  9. targetSdkVersion rootProject.ext.targetSdkVersion
  10. versionCode 1
  11. versionName "1.0"
  12. testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  13. javaCompileOptions {
  14. annotationProcessorOptions {
  15. arguments = [AROUTER_MODULE_NAME: project.getName()]
  16. }
  17. }
  18. // buildConfigField "String", "SERVER_URL", "\"https://twww.winhc.net/api/\""
  19. }
  20. compileOptions {
  21. sourceCompatibility rootProject.ext.appSourceCompatibility
  22. targetCompatibility rootProject.ext.appTargetCompatibility
  23. }
  24. buildTypes {
  25. release {
  26. buildConfigField "String", "SERVER_URL", "\"https://gw.winhc.cn/\""
  27. minifyEnabled true
  28. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  29. }
  30. debug {
  31. buildConfigField "String", "SERVER_URL", "\"https://twww.winhc.net/api/\""
  32. minifyEnabled false
  33. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  34. }
  35. }
  36. }
  37. dependencies {
  38. implementation fileTree(dir: 'libs', include: ['*.jar'])
  39. implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
  40. testImplementation 'junit:junit:4.12'
  41. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  42. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  43. // 添加 Sensors Analytics SDK 依赖
  44. api 'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:5.2.2'
  45. // 添加 A/B Testing SDK 依赖
  46. api 'com.sensorsdata.analytics.abtesting:SensorsABTesting:0.0.7'
  47. implementation project(path: ':base')
  48. implementation project(path: ':http')
  49. api 'com.alibaba:fastjson:1.1.71.android'
  50. api 'com.google.code.gson:gson:2.8.5'
  51. api 'io.reactivex.rxjava2:rxandroid:2.1.1'
  52. implementation "com.alibaba:arouter-api:1.5.2"
  53. annotationProcessor "com.alibaba:arouter-compiler:1.5.2"
  54. }