build.gradle.kts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* _____ _
  2. * |_ _| |_ _ _ ___ ___ _ __ __ _
  3. * | | | ' \| '_/ -_) -_) ' \/ _` |_
  4. * |_| |_||_|_| \___\___|_|_|_\__,_(_)
  5. *
  6. * Threema for Android
  7. * Copyright (c) 2025 Threema GmbH
  8. *
  9. * This program is free software: you can redistribute it and/or modify
  10. * it under the terms of the GNU Affero General Public License, version 3,
  11. * as published by the Free Software Foundation.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU Affero General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU Affero General Public License
  19. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  20. */
  21. plugins {
  22. alias(libs.plugins.java.library)
  23. alias(libs.plugins.kotlin.jvm)
  24. alias(libs.plugins.jacoco)
  25. }
  26. dependencies {
  27. implementation(libs.kotlin.stdlib)
  28. implementation(libs.kotlinx.coroutines.core)
  29. testImplementation(libs.junit)
  30. testImplementation(libs.mockk)
  31. testImplementation(libs.kotlinx.coroutines.test)
  32. testImplementation(libs.kotlin.test)
  33. testImplementation(libs.turbine)
  34. testImplementation(project(":test-helpers"))
  35. }
  36. tasks.withType<Test> {
  37. useJUnitPlatform()
  38. }
  39. tasks.withType<JacocoReport> {
  40. reports {
  41. xml.required = true
  42. html.required = false
  43. }
  44. }
  45. sonarqube {
  46. properties {
  47. property("sonar.projectKey", "android-client")
  48. property("sonar.projectName", "Threema for Android")
  49. property("sonar.sources", "src/main/")
  50. property("sonar.tests", "src/test/")
  51. property("sonar.sourceEncoding", "UTF-8")
  52. property("sonar.verbose", "true")
  53. property(
  54. "sonar.coverage.jacoco.xmlReportPaths",
  55. "${projectDir.parentFile.path}/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml",
  56. )
  57. }
  58. }
  59. java {
  60. sourceCompatibility = JavaVersion.VERSION_11
  61. targetCompatibility = JavaVersion.VERSION_11
  62. }
  63. kotlin {
  64. compilerOptions {
  65. jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
  66. }
  67. }