Files
LMS/services/identity-service/build.gradle.kts

87 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

plugins {
id("lms.spring-boot")
}
/** PIT через CLI: Gradle-плагин 1.15 несовместим с Gradle 9.6, JUnit5-плагин — с JUnit Platform 6. */
val pitest by configurations.creating
dependencies {
add("pitest", libs.pitestCommandLine)
}
tasks.register<JavaExec>("pitestPromotionPlanner") {
group = "verification"
description = "Mutation testing PromotionPlanner (P0 promotion rules)"
dependsOn(tasks.testClasses)
classpath = pitest + sourceSets.getByName("test").runtimeClasspath
mainClass.set("org.pitest.mutationtest.commandline.MutationCoverageReport")
val reportDir =
layout.buildDirectory
.dir("reports/pitest-promotion-planner")
.get()
.asFile
.absolutePath
val sourceDirs =
sourceSets.main
.get()
.kotlin.srcDirs
.joinToString(",") { it.absolutePath }
val testClasspath = sourceSets.getByName("test").runtimeClasspath.asPath
args(
"--reportDir",
reportDir,
"--targetClasses",
"ru.ysu.lms.identity.promotion.PromotionPlanner",
"--targetTests",
"ru.ysu.lms.identity.promotion.PromotionPlannerMutationTest",
"--sourceDirs",
sourceDirs,
"--classPath",
testClasspath,
"--mutators",
"STRONGER",
"--threads",
"1",
"--outputFormats",
"XML,HTML",
"--timestampedReports",
"false",
"--timeoutConst",
"15000",
"--failWhenNoMutations",
"true",
)
}
dependencies {
implementation(platform(libs.springBootBom))
implementation(libs.springBootStarterWeb)
implementation(libs.springBootStarterValidation)
implementation(libs.springBootStarterActuator)
implementation(libs.springBootStarterDataJpa)
implementation(libs.springBootStarterSecurity)
implementation(libs.springBootStarterOauth2ResourceServer)
implementation(libs.springBootStarterFlyway)
implementation(libs.flywayPostgresql)
runtimeOnly(libs.postgresql)
implementation(libs.jacksonYaml)
implementation(libs.jacksonModuleKotlin)
implementation(libs.jackson3ModuleKotlin)
implementation(libs.springdocStarterWebmvcUi)
implementation(libs.apachePoiOoxml)
implementation(project(":libs:common-http"))
implementation(project(":libs:security-jwt"))
testImplementation(project(":libs:test-support"))
testImplementation(libs.springBootStarterTest)
testImplementation(libs.springSecurityTest)
// PIT JUnit5-плагин несовместим с JUnit Platform 6; mutation harness — JUnit 4.
testImplementation("junit:junit:4.13.2")
}
springBoot {
mainClass.set("ru.ysu.lms.identity.IdentityServiceApplicationKt")
}