/* _____ _
* |_ _| |_ _ _ ___ ___ _ __ __ _
* | | | ' \| '_/ -_) -_) ' \/ _` |_
* |_| |_||_|_| \___\___|_|_|_\__,_(_)
*
* Threema for Android
* Copyright (c) 2025 Threema GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see .
*/
plugins {
alias(libs.plugins.java.library)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.jacoco)
}
dependencies {
// Standard libraries
api(libs.kotlin.stdlib)
api(libs.kotlinx.coroutines.core)
// Dependency injection
api(project.dependencies.platform(libs.koin.bom))
api(libs.koin.core)
// HTTP
api(platform(libs.okhttp3.bom))
api(libs.okhttp3)
api(libs.okhttp3.coroutines)
api(libs.okhttp3.loggingInterceptor)
// Testing
testImplementation(libs.junit)
testImplementation(libs.mockk)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.kotlin.test)
testImplementation(libs.turbine)
testImplementation(project(":test-helpers"))
}
tasks.withType {
useJUnitPlatform()
}
tasks.withType {
reports {
xml.required = true
html.required = false
}
}
sonarqube {
properties {
property("sonar.projectKey", "android-client")
property("sonar.projectName", "Threema for Android")
property("sonar.sources", "src/main/")
property("sonar.tests", "src/test/")
property("sonar.sourceEncoding", "UTF-8")
property("sonar.verbose", "true")
property(
"sonar.coverage.jacoco.xmlReportPaths",
"${projectDir.parentFile.path}/build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml",
)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11
}
}