Migrate detekt to a convention plugin in `buildSrc`, switch the project to a fully explicit YAML config (`buildUponDefaultConfig = false`), fix the real findings that this stricter setup revealed, and remove `@Suppress` annotations that became unnecessary after the rule changes. ## Motivation and Context - Explicit visibility into the rule set - Lock against detekt version upgrades ## Breaking Changes None ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [x] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [x] I have added appropriate error handling - [x] I have added or updated documentation as needed
59 lines
1.5 KiB
Kotlin
59 lines
1.5 KiB
Kotlin
@file:OptIn(ExperimentalWasmDsl::class)
|
|
|
|
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
|
|
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
|
import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmDefaultMode
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
|
|
|
|
plugins {
|
|
kotlin("multiplatform")
|
|
kotlin("plugin.serialization")
|
|
id("org.jetbrains.kotlinx.atomicfu")
|
|
}
|
|
|
|
kotlin {
|
|
|
|
compilerOptions {
|
|
languageVersion = KotlinVersion.KOTLIN_2_1
|
|
apiVersion = KotlinVersion.KOTLIN_2_1
|
|
freeCompilerArgs =
|
|
listOf(
|
|
"-Wextra",
|
|
"-Xmulti-dollar-interpolation",
|
|
)
|
|
}
|
|
jvm {
|
|
compilerOptions {
|
|
jvmTarget = JvmTarget.JVM_11
|
|
javaParameters = true
|
|
jvmDefault = JvmDefaultMode.ENABLE
|
|
freeCompilerArgs.addAll(
|
|
"-Xdebug",
|
|
)
|
|
}
|
|
|
|
tasks.withType<Test>().configureEach {
|
|
|
|
useJUnitPlatform()
|
|
|
|
maxParallelForks = Runtime.getRuntime().availableProcessors()
|
|
forkEvery = 100
|
|
testLogging {
|
|
exceptionFormat = TestExceptionFormat.SHORT
|
|
events("failed")
|
|
}
|
|
systemProperty("kotest.output.ansi", "true")
|
|
}
|
|
}
|
|
macosArm64()
|
|
linuxX64()
|
|
linuxArm64()
|
|
mingwX64()
|
|
js { nodejs() }
|
|
wasmJs { nodejs() }
|
|
|
|
explicitApi = ExplicitApiMode.Strict
|
|
jvmToolchain(21)
|
|
}
|