epic-12: after epic audit and init commit
This commit is contained in:
+126
@@ -0,0 +1,126 @@
|
||||
import io.gitlab.arturbosch.detekt.Detekt
|
||||
|
||||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '2.0.21' apply false
|
||||
id 'org.jetbrains.kotlin.plugin.serialization' version '2.0.21' apply false
|
||||
id "io.gitlab.arturbosch.detekt" version "1.23.7"
|
||||
id "org.jetbrains.kotlinx.kover" version "0.8.3"
|
||||
}
|
||||
|
||||
ext {
|
||||
kotlin_version = '2.0.21'
|
||||
kotlinx_coroutines_version = '1.9.0'
|
||||
kotlinx_serialization_version = '1.7.3'
|
||||
kotlinx_datetime_version = '0.6.2'
|
||||
junit_version = '5.11.0'
|
||||
sqlite_jdbc_version = '3.47.1.0'
|
||||
|
||||
exposed_version = '0.57.0'
|
||||
ktor_version = '3.0.3'
|
||||
hoplite_version = '2.8.2'
|
||||
sqlite_jdbc_version = '3.47.1.0'
|
||||
}
|
||||
|
||||
allprojects {
|
||||
group = 'com.correx'
|
||||
version = '0.1.0'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
pluginManager.withPlugin("org.jetbrains.kotlin.jvm") {
|
||||
|
||||
apply plugin: "io.gitlab.arturbosch.detekt"
|
||||
apply plugin: "org.jetbrains.kotlinx.kover"
|
||||
|
||||
detekt {
|
||||
toolVersion = "1.23.7"
|
||||
config.setFrom("$rootDir/detekt.yml")
|
||||
buildUponDefaultConfig = true
|
||||
ignoreFailures = false
|
||||
}
|
||||
|
||||
kover {
|
||||
reports {
|
||||
// verify {
|
||||
// rule {
|
||||
// minBound(80)
|
||||
// }
|
||||
// }
|
||||
filters {
|
||||
excludes {
|
||||
classes("*Generated*")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("check") {
|
||||
dependsOn("test")
|
||||
dependsOn("detekt")
|
||||
dependsOn("koverVerify")
|
||||
}
|
||||
}
|
||||
|
||||
plugins.withId('org.jetbrains.kotlin.jvm') {
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(21)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinx_coroutines_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinx_serialization_version"
|
||||
implementation "org.xerial:sqlite-jdbc:$sqlite_jdbc_version"
|
||||
implementation "org.jetbrains.kotlinx:kotlinx-datetime:$kotlinx_datetime_version"
|
||||
testImplementation "org.junit.jupiter:junit-jupiter:$junit_version"
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed", "standardOut", "standardError"
|
||||
showStandardStreams = true
|
||||
exceptionFormat = 'full'
|
||||
}
|
||||
afterSuite { desc, result ->
|
||||
if (!desc.parent) { // Only log for the final root suite
|
||||
def duration = (result.endTime - result.startTime) / 1000
|
||||
|
||||
println """
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
tests: ${result.testCount}
|
||||
passed: ${result.successfulTestCount}
|
||||
failed: ${result.failedTestCount}
|
||||
skipped: ${result.skippedTestCount}
|
||||
|
||||
result: ${result.resultType}
|
||||
time: ${duration}s
|
||||
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(Detekt).configureEach {
|
||||
reports {
|
||||
html.required.set(true)
|
||||
xml.required.set(true)
|
||||
txt.required.set(false)
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
|
||||
compilerOptions {
|
||||
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21
|
||||
freeCompilerArgs.add("-Xcontext-receivers")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user