build.gradle 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. if (rootProject.ext.isDebtModule) {
  2. apply plugin: 'com.android.library'
  3. } else {
  4. apply plugin: 'com.android.application'
  5. }
  6. android {
  7. compileSdkVersion rootProject.ext.compileSdkVersion
  8. buildToolsVersion rootProject.ext.buildToolsVersion
  9. defaultConfig {
  10. minSdkVersion rootProject.ext.minSdkVersion
  11. targetSdkVersion rootProject.ext.targetSdkVersion
  12. versionCode 1
  13. versionName "1.0"
  14. if (!rootProject.ext.isDebtModule) {
  15. applicationId "com.winhc.debt"
  16. }else{
  17. javaCompileOptions {
  18. annotationProcessorOptions {
  19. arguments = [AROUTER_MODULE_NAME: project.getName(), AROUTER_GENERATE_DOC: "enable"]
  20. }
  21. }
  22. }
  23. }
  24. compileOptions {
  25. sourceCompatibility rootProject.ext.appSourceCompatibility
  26. targetCompatibility rootProject.ext.appTargetCompatibility
  27. }
  28. buildTypes {
  29. release {
  30. minifyEnabled false
  31. proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
  32. }
  33. }
  34. sourceSets {
  35. main {
  36. if (!rootProject.ext.isDebtModule) {
  37. manifest.srcFile 'src/debug/AndroidManifest.xml'
  38. java.srcDir 'src/main/java/'
  39. } else {
  40. manifest.srcFile 'src/main/AndroidManifest.xml'
  41. java.srcDir 'src/main/java/'
  42. }
  43. }
  44. }
  45. }
  46. dependencies {
  47. implementation fileTree(dir: 'libs', include: ['*.jar'])
  48. implementation project(path: ':busCore')
  49. testImplementation 'junit:junit:4.12'
  50. androidTestImplementation 'com.android.support.test:runner:1.0.2'
  51. androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  52. if (rootProject.ext.isDebtModule) {
  53. annotationProcessor "com.alibaba:arouter-compiler:1.5.2"
  54. }
  55. }