/app/k9mail/build.gradle

http://github.com/k9mail/k-9 · Gradle · 149 lines · 116 code · 30 blank · 3 comment · 0 complexity · 83bbc36914e99a5aa4ffe6fc66212d6b MD5 · raw file

  1. apply plugin: 'com.android.application'
  2. apply plugin: 'org.jetbrains.kotlin.android'
  3. if (rootProject.testCoverage) {
  4. apply plugin: 'jacoco'
  5. }
  6. dependencies {
  7. implementation project(":app:ui:legacy")
  8. implementation project(":app:core")
  9. implementation project(":app:storage")
  10. implementation project(":app:crypto-openpgp")
  11. implementation project(":backend:imap")
  12. implementation project(":backend:pop3")
  13. implementation project(":backend:webdav")
  14. debugImplementation project(":backend:demo")
  15. implementation "androidx.appcompat:appcompat:${versions.androidxAppCompat}"
  16. implementation "androidx.core:core-ktx:${versions.androidxCore}"
  17. implementation "com.takisoft.preferencex:preferencex:${versions.preferencesFix}"
  18. implementation "com.jakewharton.timber:timber:${versions.timber}"
  19. implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.kotlinCoroutines}"
  20. implementation "com.github.bumptech.glide:glide:${versions.glide}"
  21. annotationProcessor "com.github.bumptech.glide:compiler:${versions.glide}"
  22. if (project.hasProperty('k9mail.enableLeakCanary') && project.property('k9mail.enableLeakCanary') == "true") {
  23. debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
  24. }
  25. // Required for DependencyInjectionTest to be able to resolve OpenPgpApiManager
  26. testImplementation project(':plugins:openpgp-api-lib:openpgp-api')
  27. testImplementation "org.robolectric:robolectric:${versions.robolectric}"
  28. testImplementation "junit:junit:${versions.junit}"
  29. testImplementation "com.google.truth:truth:${versions.truth}"
  30. testImplementation "org.mockito:mockito-core:${versions.mockito}"
  31. testImplementation "org.mockito.kotlin:mockito-kotlin:${versions.mockitoKotlin}"
  32. testImplementation "io.insert-koin:koin-test-junit4:${versions.koin}"
  33. }
  34. android {
  35. compileSdkVersion buildConfig.compileSdk
  36. buildToolsVersion buildConfig.buildTools
  37. defaultConfig {
  38. applicationId "com.fsck.k9"
  39. testApplicationId "com.fsck.k9.tests"
  40. versionCode 29004
  41. versionName '5.905-SNAPSHOT'
  42. // Keep in sync with the resource string array 'supported_languages'
  43. resConfigs "in", "br", "ca", "cs", "cy", "da", "de", "et", "en", "en_GB", "es", "eo", "eu", "fr", "gd", "gl",
  44. "hr", "is", "it", "lv", "lt", "hu", "nl", "nb", "pl", "pt_PT", "pt_BR", "ru", "ro", "sq", "sk", "sl",
  45. "fi", "sv", "tr", "el", "be", "bg", "sr", "uk", "iw", "ar", "fa", "ml", "ko", "zh_CN", "zh_TW", "ja"
  46. minSdkVersion buildConfig.minSdk
  47. targetSdkVersion buildConfig.targetSdk
  48. vectorDrawables.useSupportLibrary = true
  49. testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  50. }
  51. signingConfigs {
  52. release
  53. }
  54. buildTypes {
  55. release {
  56. if (project.hasProperty('storeFile')) {
  57. signingConfig signingConfigs.release
  58. }
  59. minifyEnabled true
  60. proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  61. buildConfigField "boolean", "DEVELOPER_MODE", "false"
  62. }
  63. debug {
  64. applicationIdSuffix ".debug"
  65. testCoverageEnabled rootProject.testCoverage
  66. minifyEnabled false
  67. buildConfigField "boolean", "DEVELOPER_MODE", "true"
  68. }
  69. }
  70. lintOptions {
  71. checkDependencies true
  72. // Do not abort build if lint finds errors
  73. abortOnError false
  74. lintConfig file("$rootProject.projectDir/config/lint/lint.xml")
  75. }
  76. packagingOptions {
  77. exclude 'META-INF/DEPENDENCIES'
  78. exclude 'META-INF/LICENSE'
  79. exclude 'META-INF/LICENSE.txt'
  80. exclude 'META-INF/NOTICE'
  81. exclude 'META-INF/NOTICE.txt'
  82. exclude 'META-INF/README'
  83. exclude 'META-INF/README.md'
  84. exclude 'META-INF/CHANGES'
  85. exclude 'LICENSE.txt'
  86. exclude 'META-INF/*.kotlin_module'
  87. exclude 'META-INF/*.version'
  88. exclude 'kotlin/**'
  89. exclude 'DebugProbesKt.bin'
  90. }
  91. dependenciesInfo {
  92. includeInApk = false
  93. includeInBundle = false
  94. }
  95. compileOptions {
  96. sourceCompatibility javaVersion
  97. targetCompatibility javaVersion
  98. }
  99. kotlinOptions {
  100. jvmTarget = kotlinJvmVersion
  101. }
  102. testOptions {
  103. unitTests {
  104. includeAndroidResources = true
  105. }
  106. }
  107. }
  108. if (project.hasProperty('keyAlias')) {
  109. android.signingConfigs.release.keyAlias = keyAlias
  110. }
  111. if (project.hasProperty('keyPassword')) {
  112. android.signingConfigs.release.keyPassword = keyPassword
  113. }
  114. if (project.hasProperty('storeFile')) {
  115. android.signingConfigs.release.storeFile = file(storeFile)
  116. }
  117. if (project.hasProperty('storePassword')) {
  118. android.signingConfigs.release.storePassword = storePassword
  119. }