build.gradle 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. if (isModule.toBoolean()) {
  2. apply plugin: 'com.android.application'
  3. } else {
  4. apply plugin: 'com.android.library'
  5. }
  6. android {
  7. compileSdkVersion build_versions.target_sdk
  8. defaultConfig {
  9. minSdkVersion build_versions.min_sdk
  10. targetSdkVersion build_versions.target_sdk
  11. versionCode 1
  12. versionName "1.0"
  13. javaCompileOptions {
  14. annotationProcessorOptions {
  15. arguments = [moduleName: project.getName()]
  16. }
  17. }
  18. }
  19. compileOptions {
  20. sourceCompatibility JavaVersion.VERSION_1_8
  21. targetCompatibility JavaVersion.VERSION_1_8
  22. }
  23. sourceSets {
  24. main {
  25. if (isModule.toBoolean()) {
  26. manifest.srcFile 'src/main/module/AndroidManifest.xml'
  27. } else {
  28. manifest.srcFile 'src/main/AndroidManifest.xml'
  29. //集成开发模式下排除debug文件夹中的所有Java文件
  30. java {
  31. exclude 'debug/**'
  32. }
  33. }
  34. }
  35. }
  36. buildTypes {
  37. release {
  38. minifyEnabled false
  39. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  40. }
  41. }
  42. }
  43. dependencies {
  44. implementation fileTree(dir: 'libs', include: ['*.jar'])
  45. annotationProcessor deps.arouter_compiler
  46. implementation project(':lib_common')
  47. implementation project(':lib_widget')
  48. }