build.gradle.kts 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. plugins {
  2. alias(libs.plugins.java.library)
  3. alias(libs.plugins.kotlin.jvm)
  4. alias(libs.plugins.jacoco)
  5. }
  6. dependencies {
  7. // Standard libraries
  8. api(libs.kotlin.stdlib)
  9. api(libs.kotlinx.coroutines.core)
  10. // Dependency injection
  11. api(project.dependencies.platform(libs.koin.bom))
  12. api(libs.koin.core)
  13. // HTTP
  14. api(platform(libs.okhttp3.bom))
  15. api(libs.okhttp3)
  16. api(libs.okhttp3.coroutines)
  17. api(libs.okhttp3.loggingInterceptor)
  18. // JSON
  19. implementation(libs.kotlinx.serialization.json)
  20. // Testing
  21. testImplementation(libs.junit)
  22. testImplementation(libs.mockk)
  23. testImplementation(libs.kotlinx.coroutines.test)
  24. testImplementation(libs.kotlin.test)
  25. testImplementation(libs.turbine)
  26. testImplementation(project(":test-helpers"))
  27. }
  28. tasks.withType<Test> {
  29. useJUnitPlatform()
  30. }
  31. tasks.withType<JacocoReport> {
  32. reports {
  33. xml.required = true
  34. html.required = false
  35. }
  36. }
  37. sonarqube {
  38. properties {
  39. property("sonar.projectKey", "android-client")
  40. property("sonar.projectName", "Threema for Android")
  41. property("sonar.sources", "src/main/")
  42. property("sonar.tests", "src/test/")
  43. property("sonar.sourceEncoding", "UTF-8")
  44. property("sonar.verbose", "true")
  45. property(
  46. "sonar.coverage.jacoco.xmlReportPaths",
  47. "${projectDir.parentFile.path}/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml",
  48. )
  49. }
  50. }
  51. java {
  52. sourceCompatibility = JavaVersion.VERSION_11
  53. targetCompatibility = JavaVersion.VERSION_11
  54. }
  55. kotlin {
  56. compilerOptions {
  57. jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
  58. }
  59. }