2025-10-12 14:11:25 +02:00
|
|
|
import com.android.build.gradle.internal.lint.AndroidLintTask
|
2024-08-18 10:38:20 +02:00
|
|
|
import com.github.benmanes.gradle.versions.updates.DependencyUpdatesTask
|
2024-07-02 10:53:04 +02:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
|
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
|
2025-10-12 14:11:25 +02:00
|
|
|
import org.sonarqube.gradle.SonarTask
|
2024-07-02 10:53:04 +02:00
|
|
|
|
2024-04-29 17:14:43 +02:00
|
|
|
plugins {
|
2024-08-18 10:38:20 +02:00
|
|
|
alias(libs.plugins.versions)
|
2025-07-19 00:04:19 +02:00
|
|
|
alias(libs.plugins.sonarqube)
|
2025-10-14 22:18:11 +02:00
|
|
|
alias(libs.plugins.kotlin.kover)
|
2024-07-02 23:11:53 +02:00
|
|
|
alias(libs.plugins.android.application) apply false
|
|
|
|
|
alias(libs.plugins.android.library) apply false
|
|
|
|
|
alias(libs.plugins.compose) apply false
|
2024-08-18 10:38:20 +02:00
|
|
|
alias(libs.plugins.compose.compiler) apply false
|
2024-07-02 10:53:04 +02:00
|
|
|
alias(libs.plugins.kotlin.multiplatform) apply false
|
|
|
|
|
alias(libs.plugins.kotlin.jvm) apply false
|
2025-10-14 22:18:11 +02:00
|
|
|
alias(libs.plugins.kotlin.android) apply false
|
2024-07-02 10:53:04 +02:00
|
|
|
}
|
|
|
|
|
|
2025-07-19 00:04:19 +02:00
|
|
|
sonar {
|
|
|
|
|
properties {
|
|
|
|
|
property("sonar.projectKey", "YAEP")
|
|
|
|
|
property("sonar.projectName", "YAEP")
|
2025-10-12 14:11:25 +02:00
|
|
|
|
|
|
|
|
property(
|
|
|
|
|
"sonar.coverage.jacoco.xmlReportPaths",
|
2025-10-14 22:18:11 +02:00
|
|
|
"${layout.buildDirectory.asFile.get()}/reports/kover/report.xml"
|
2025-10-12 14:11:25 +02:00
|
|
|
)
|
2025-07-19 00:04:19 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2025-10-12 14:11:25 +02:00
|
|
|
tasks.withType<SonarTask>().configureEach {
|
|
|
|
|
dependsOn(
|
2025-10-12 15:42:17 +02:00
|
|
|
subprojects
|
|
|
|
|
.flatMap { it.tasks.withType<AndroidLintTask>() }
|
|
|
|
|
.filter { it.variantName != "release" }
|
2025-10-12 14:11:25 +02:00
|
|
|
)
|
2025-10-14 22:18:11 +02:00
|
|
|
dependsOn("koverXmlReport")
|
2025-10-12 14:11:25 +02:00
|
|
|
}
|
|
|
|
|
|
2024-07-02 10:53:04 +02:00
|
|
|
tasks.withType<KotlinJvmCompile>().configureEach {
|
|
|
|
|
compilerOptions {
|
2025-05-30 06:06:51 +02:00
|
|
|
jvmTarget.set(JvmTarget.fromTarget(libs.versions.jdk.get()))
|
2024-07-02 10:53:04 +02:00
|
|
|
}
|
|
|
|
|
}
|
2024-08-18 10:38:20 +02:00
|
|
|
|
|
|
|
|
tasks.withType<DependencyUpdatesTask> {
|
|
|
|
|
rejectVersionIf {
|
|
|
|
|
isNonStable(candidate.version) && !isNonStable(currentVersion)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun isNonStable(version: String): Boolean {
|
|
|
|
|
return version.contains("dev", ignoreCase = true)
|
|
|
|
|
|| version.contains("alpha", ignoreCase = true)
|
|
|
|
|
|| version.contains("beta", ignoreCase = true)
|
|
|
|
|
|| version.contains("RC", ignoreCase = true)
|
|
|
|
|
}
|
2025-10-12 14:11:25 +02:00
|
|
|
|
|
|
|
|
subprojects {
|
|
|
|
|
tasks.withType<Test> {
|
|
|
|
|
testLogging {
|
|
|
|
|
events("passed", "skipped", "failed")
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-14 22:18:11 +02:00
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
kover(projects.domain)
|
|
|
|
|
kover(projects.commonUI)
|
|
|
|
|
kover(projects.desktop)
|
|
|
|
|
kover(projects.android)
|
|
|
|
|
}
|