From 12eb73537b0ccc861af1a2a580bd4aa44b3bbb9e Mon Sep 17 00:00:00 2001 From: Yang Date: Mon, 22 Sep 2025 19:58:02 +1000 Subject: [PATCH] Detekt 2.0.0-alpha.0. --- build-logic/build.gradle.kts | 9 +- .../buildlogic/convention/ConventionPlugin.kt | 126 ++++++++---------- .../io/github/reactivecircus/cache4k/Cache.kt | 4 - .../cache4k/ConcurrentMutableMap.kt | 5 + .../reactivecircus/cache4k/FakeTimeSource.kt | 1 - .../cache4k/KeyedSynchronizer.kt | 1 - .../reactivecircus/cache4k/RealCache.kt | 1 - .../cache4k/CacheBuilderTest.kt | 1 - .../cache4k/CacheEvictionTest.kt | 1 - .../reactivecircus/cache4k/CacheExpiryTest.kt | 1 - .../cache4k/CacheInvalidationTest.kt | 1 - .../reactivecircus/cache4k/CacheLoaderTest.kt | 1 - .../cache4k/DefaultCacheTest.kt | 1 - .../cache4k/ReorderingIsoMutableSetTest.kt | 1 - .../cache4k/Cache4kLincheckTest.kt | 1 - .../ReorderingIsoMutableSetLincheckTest.kt | 1 - .../cache4k/JvmConcurrencyTest.kt | 1 - detekt.yml | 10 +- gradle/libs.versions.toml | 11 +- 19 files changed, 82 insertions(+), 96 deletions(-) diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index d37ef52..224b760 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -1,9 +1,10 @@ -import io.gitlab.arturbosch.detekt.Detekt +import dev.detekt.gradle.Detekt import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { - `kotlin-dsl` + `java-gradle-plugin` + alias(libs.plugins.kotlin.jvm) alias(libs.plugins.detekt) } @@ -22,7 +23,6 @@ detekt { source.from(files("src/")) config.from(files("../detekt.yml")) buildUponDefaultConfig = true - allRules = true parallel = true } @@ -30,7 +30,6 @@ tasks.withType().configureEach { jvmTarget = JvmTarget.JVM_11.target reports { xml.required.set(false) - txt.required.set(false) sarif.required.set(false) md.required.set(false) } @@ -51,7 +50,7 @@ dependencies { implementation(files(libs.javaClass.superclass.protectionDomain.codeSource.location)) // enable Ktlint formatting - add("detektPlugins", libs.plugin.detektFormatting) + add("detektPlugins", libs.plugin.detektKtlintWrapper) implementation(libs.plugin.kotlin) implementation(libs.plugin.dokka) diff --git a/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt b/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt index 6c08997..fa9e174 100644 --- a/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt +++ b/build-logic/src/main/kotlin/io/github/reactivecircus/cache4k/buildlogic/convention/ConventionPlugin.kt @@ -2,22 +2,14 @@ package io.github.reactivecircus.cache4k.buildlogic.convention import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.MavenPublishPlugin -import io.gitlab.arturbosch.detekt.Detekt -import io.gitlab.arturbosch.detekt.DetektPlugin -import io.gitlab.arturbosch.detekt.extensions.DetektExtension +import dev.detekt.gradle.Detekt +import dev.detekt.gradle.extensions.DetektExtension +import dev.detekt.gradle.plugin.DetektPlugin import kotlinx.validation.BinaryCompatibilityValidatorPlugin import org.gradle.accessors.dm.LibrariesForLibs import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.tasks.testing.Test -import org.gradle.kotlin.dsl.configure -import org.gradle.kotlin.dsl.creating -import org.gradle.kotlin.dsl.getValue -import org.gradle.kotlin.dsl.getting -import org.gradle.kotlin.dsl.invoke -import org.gradle.kotlin.dsl.register -import org.gradle.kotlin.dsl.the -import org.gradle.kotlin.dsl.withType import org.jetbrains.dokka.gradle.DokkaExtension import org.jetbrains.dokka.gradle.DokkaPlugin import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl @@ -42,9 +34,9 @@ internal class ConventionPlugin : Plugin { private fun Project.configureRootProject() { plugins.withId("org.jetbrains.dokka") { - extensions.configure { - dokkaPublications.configureEach { - outputDirectory.set(layout.buildDirectory.dir("docs/api")) + extensions.configure(DokkaExtension::class.java) { + it.dokkaPublications.configureEach { + it.outputDirectory.set(layout.buildDirectory.dir("docs/api")) } } } @@ -60,11 +52,11 @@ private fun Project.configureSubproject() { version = property("VERSION_NAME") as String plugins.withId("org.jetbrains.kotlin.multiplatform") { - extensions.configure { - explicitApi() - configureTargets(this@configureSubproject) - sourceSets.configureEach { - languageSettings.apply { + extensions.configure(KotlinMultiplatformExtension::class.java) { + it.explicitApi() + it.configureTargets(this@configureSubproject) + it.sourceSets.configureEach { + it.languageSettings.apply { progressiveMode = true } } @@ -73,82 +65,81 @@ private fun Project.configureSubproject() { // configure detekt pluginManager.apply(DetektPlugin::class.java) - dependencies.add("detektPlugins", the().plugin.detektFormatting) - plugins.withType { - extensions.configure { - source.from(files("src/")) - config.from(files("${project.rootDir}/detekt.yml")) - buildUponDefaultConfig = true - allRules = true - parallel = true + dependencies.add("detektPlugins", (extensions.getByName("libs") as LibrariesForLibs).plugin.detektKtlintWrapper) + plugins.withType(DetektPlugin::class.java) { + extensions.configure(DetektExtension::class.java) { + it.source.from(files("src/")) + it.config.from(files("${project.rootDir}/detekt.yml")) + it.buildUponDefaultConfig.set(true) + it.parallel.set(true) } - tasks.withType().configureEach { - jvmTarget = JvmTarget.JVM_11.target - reports { - xml.required.set(false) - txt.required.set(false) - sarif.required.set(false) - md.required.set(false) + tasks.withType(Detekt::class.java).configureEach { + it.jvmTarget.set(JvmTarget.JVM_11.target) + it.reports { report -> + report.xml.required.set(false) + report.sarif.required.set(false) + report.md.required.set(false) } } } // configure test - tasks.withType().configureEach { - useJUnitPlatform() - testLogging { - events("passed", "skipped", "failed") + tasks.withType(Test::class.java).configureEach { test -> + test.useJUnitPlatform() + test.testLogging { + it.events("passed", "skipped", "failed") } } // configure publishing pluginManager.apply(MavenPublishPlugin::class.java) - extensions.configure { - publishToMavenCentral(automaticRelease = true) - signAllPublications() + extensions.configure(MavenPublishBaseExtension::class.java) { + it.publishToMavenCentral(automaticRelease = true) + it.signAllPublications() } } @Suppress("LongMethod", "MagicNumber") private fun KotlinMultiplatformExtension.configureTargets(project: Project) { targets.configureEach { - compilations.configureEach { - compileTaskProvider.configure { + it.compilations.configureEach { + it.compileTaskProvider.configure { compilerOptions { freeCompilerArgs.add("-Xexpect-actual-classes") } } } } - project.tasks.withType().configureEach { - compilerOptions { + project.tasks.withType(KotlinJvmCompile::class.java).configureEach { + it.compilerOptions { jvmTarget.set(JvmTarget.JVM_11) freeCompilerArgs.addAll( "-Xjvm-default=all" ) } } - project.tasks.withType().configureEach { - compilerOptions { + project.tasks.withType(KotlinJsCompile::class.java).configureEach { + it.compilerOptions { moduleKind.set(JsModuleKind.MODULE_COMMONJS) } } jvm { val main = compilations.getByName("main") - compilations.create("lincheck") { - defaultSourceSet { + compilations.create("lincheck") { compilation -> + compilation.defaultSourceSet { dependencies { implementation(main.compileDependencyFiles + main.output.classesDirs) } } - project.tasks.register("jvmLincheck") { - classpath = compileDependencyFiles + runtimeDependencyFiles + output.allOutputs - testClassesDirs = output.classesDirs - useJUnitPlatform() - testLogging { - events("passed", "skipped", "failed") + project.tasks.register("jvmLincheck", Test::class.java) { + it.classpath = compilation.compileDependencyFiles + + compilation.runtimeDependencyFiles + compilation.output.allOutputs + it.testClassesDirs = compilation.output.classesDirs + it.useJUnitPlatform() + it.testLogging { + it.events("passed", "skipped", "failed") } - jvmArgs( + it.jvmArgs( "--add-opens", "java.base/jdk.internal.misc=ALL-UNNAMED", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-exports", "java.base/jdk.internal.util=ALL-UNNAMED", @@ -183,20 +174,19 @@ private fun KotlinMultiplatformExtension.configureTargets(project: Project) { mingwX64() applyDefaultHierarchyTemplate() - @Suppress("UnusedPrivateProperty") - sourceSets { - val nonJvmMain by creating { - dependsOn(commonMain.get()) + with(sourceSets) { + create("nonJvmMain") { + it.dependsOn(commonMain.get()) } - val jvmLincheck by getting { - dependsOn(jvmMain.get()) + getByName("jvmLincheck") { + it.dependsOn(jvmMain.get()) } - jsMain.get().dependsOn(nonJvmMain) - val wasmJsMain by getting { - dependsOn(nonJvmMain) + jsMain.get().dependsOn(getByName("nonJvmMain")) + getByName("wasmJsMain") { + it.dependsOn(getByName("nonJvmMain")) } - appleMain.get().dependsOn(nonJvmMain) - linuxMain.get().dependsOn(nonJvmMain) - mingwMain.get().dependsOn(nonJvmMain) + appleMain.get().dependsOn(getByName("nonJvmMain")) + linuxMain.get().dependsOn(getByName("nonJvmMain")) + mingwMain.get().dependsOn(getByName("nonJvmMain")) } } diff --git a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/Cache.kt b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/Cache.kt index 120ca44..f0d7c19 100644 --- a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/Cache.kt +++ b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/Cache.kt @@ -7,7 +7,6 @@ import kotlin.time.TimeSource * An in-memory key-value cache with support for time-based (expiration) and size-based evictions. */ public interface Cache { - /** * Returns the value associated with [key] in this cache, or null if there is no * cached value for [key]. @@ -48,7 +47,6 @@ public interface Cache { * Main entry point for creating a [Cache]. */ public interface Builder { - /** * Specifies that each entry should be automatically removed from the cache once a fixed duration * has elapsed after the entry's creation or the most recent replacement of its value. @@ -95,7 +93,6 @@ public interface Cache { public fun build(): Cache public companion object { - /** * Returns a new [Cache.Builder] instance. */ @@ -108,7 +105,6 @@ public interface Cache { * A default implementation of [Cache.Builder]. */ internal class CacheBuilderImpl : Cache.Builder { - private var expireAfterWriteDuration = Duration.INFINITE private var expireAfterAccessDuration = Duration.INFINITE diff --git a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/ConcurrentMutableMap.kt b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/ConcurrentMutableMap.kt index bd98ee0..ebc5d82 100644 --- a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/ConcurrentMutableMap.kt +++ b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/ConcurrentMutableMap.kt @@ -2,9 +2,14 @@ package io.github.reactivecircus.cache4k internal expect class ConcurrentMutableMap() { val size: Int + val values: Collection + operator fun get(key: Key): Value? + fun put(key: Key, value: Value): Value? + fun remove(key: Key): Value? + fun clear() } diff --git a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/FakeTimeSource.kt b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/FakeTimeSource.kt index 0474732..79f006a 100644 --- a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/FakeTimeSource.kt +++ b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/FakeTimeSource.kt @@ -13,7 +13,6 @@ import kotlin.time.DurationUnit * Implementation is identical to [kotlin.time.TestTimeSource] except the internal [reading] is an [AtomicLong]. */ public class FakeTimeSource : AbstractLongTimeSource(unit = DurationUnit.NANOSECONDS) { - private val reading = atomic(0L) override fun read(): Long = reading.value diff --git a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/KeyedSynchronizer.kt b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/KeyedSynchronizer.kt index d9f006f..5543e15 100644 --- a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/KeyedSynchronizer.kt +++ b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/KeyedSynchronizer.kt @@ -9,7 +9,6 @@ import kotlinx.coroutines.sync.withLock * Provides a mechanism for performing key-based synchronization. */ internal class KeyedSynchronizer { - private val keyBasedMutexes = ConcurrentMutableMap() private val mapLock = reentrantLock() diff --git a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/RealCache.kt b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/RealCache.kt index 48e2541..3e6f8fa 100644 --- a/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/RealCache.kt +++ b/cache4k/src/commonMain/kotlin/io/github/reactivecircus/cache4k/RealCache.kt @@ -36,7 +36,6 @@ internal class RealCache( val timeSource: TimeSource, private val eventListener: CacheEventListener?, ) : Cache { - private val cacheEntries = ConcurrentMutableMap>() /** diff --git a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheBuilderTest.kt b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheBuilderTest.kt index 8239913..b5ac431 100644 --- a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheBuilderTest.kt +++ b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheBuilderTest.kt @@ -10,7 +10,6 @@ import kotlin.time.Duration.Companion.nanoseconds import kotlin.time.TimeSource class CacheBuilderTest { - @Test fun expireAfterWrite_zeroDuration() { val exception = assertFailsWith { diff --git a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheEvictionTest.kt b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheEvictionTest.kt index 23d4ebb..e4e6b14 100644 --- a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheEvictionTest.kt +++ b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheEvictionTest.kt @@ -5,7 +5,6 @@ import kotlin.test.assertEquals import kotlin.test.assertNull class CacheEvictionTest { - @Test fun maxSizeLimitReached_addNewEntry_oldEntryEvicted() { val cache = Cache.Builder() diff --git a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheExpiryTest.kt b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheExpiryTest.kt index d922b32..b803a7d 100644 --- a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheExpiryTest.kt +++ b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheExpiryTest.kt @@ -7,7 +7,6 @@ import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.nanoseconds class CacheExpiryTest { - private val fakeTimeSource = FakeTimeSource() @Test diff --git a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheInvalidationTest.kt b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheInvalidationTest.kt index 07c40b3..a9dda73 100644 --- a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheInvalidationTest.kt +++ b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheInvalidationTest.kt @@ -6,7 +6,6 @@ import kotlin.test.assertNull import kotlin.time.Duration.Companion.minutes class CacheInvalidationTest { - @Test fun invalidateByKey_associatedEntryEvicted() { val cache = Cache.Builder() diff --git a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheLoaderTest.kt b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheLoaderTest.kt index 5dccc2d..810f08c 100644 --- a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheLoaderTest.kt +++ b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/CacheLoaderTest.kt @@ -9,7 +9,6 @@ import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.nanoseconds class CacheLoaderTest { - private val fakeTimeSource = FakeTimeSource() private val expiryDuration = 1.minutes diff --git a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/DefaultCacheTest.kt b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/DefaultCacheTest.kt index 5a3f4dc..b877bc7 100644 --- a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/DefaultCacheTest.kt +++ b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/DefaultCacheTest.kt @@ -5,7 +5,6 @@ import kotlin.test.assertEquals import kotlin.test.assertNull class DefaultCacheTest { - @Test fun noEntryWithAssociatedKeyExists_get_returnsNull() { val cache = Cache.Builder().build() diff --git a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetTest.kt b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetTest.kt index 9732a90..178c5a7 100644 --- a/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetTest.kt +++ b/cache4k/src/commonTest/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetTest.kt @@ -6,7 +6,6 @@ import kotlin.test.assertFalse import kotlin.test.assertTrue class ReorderingIsoMutableSetTest { - private val set = ReorderingIsoMutableSet() @Test diff --git a/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/Cache4kLincheckTest.kt b/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/Cache4kLincheckTest.kt index 5de7b2f..f219dad 100644 --- a/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/Cache4kLincheckTest.kt +++ b/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/Cache4kLincheckTest.kt @@ -8,7 +8,6 @@ import org.junit.jupiter.api.Test import kotlin.time.Duration.Companion.seconds class Cache4kLincheckTest { - private val cache = Cache.Builder() .expireAfterWrite(5.seconds) .expireAfterAccess(2.seconds) diff --git a/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetLincheckTest.kt b/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetLincheckTest.kt index f8a4089..915aa76 100644 --- a/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetLincheckTest.kt +++ b/cache4k/src/jvmLincheck/kotlin/io/github/reactivecircus/cache4k/ReorderingIsoMutableSetLincheckTest.kt @@ -7,7 +7,6 @@ import org.jetbrains.kotlinx.lincheck.strategy.stress.StressOptions import org.junit.jupiter.api.Test class ReorderingIsoMutableSetLincheckTest { - private val reorderingIsoMutableSet = ReorderingIsoMutableSet() @Operation diff --git a/cache4k/src/jvmTest/kotlin/io/github/reactivecircus/cache4k/JvmConcurrencyTest.kt b/cache4k/src/jvmTest/kotlin/io/github/reactivecircus/cache4k/JvmConcurrencyTest.kt index 7f065fb..c8df886 100644 --- a/cache4k/src/jvmTest/kotlin/io/github/reactivecircus/cache4k/JvmConcurrencyTest.kt +++ b/cache4k/src/jvmTest/kotlin/io/github/reactivecircus/cache4k/JvmConcurrencyTest.kt @@ -7,7 +7,6 @@ import org.junit.jupiter.api.RepeatedTest import kotlin.time.Duration.Companion.seconds class JvmConcurrencyTest { - private val fakeTimeSource = FakeTimeSource() @RepeatedTest(100) diff --git a/detekt.yml b/detekt.yml index 716d85d..0119896 100644 --- a/detekt.yml +++ b/detekt.yml @@ -6,9 +6,17 @@ complexity: LargeClass: excludes: ["**/*Test/**"] -formatting: +ktlint: + ChainMethodContinuation: + active: false + ClassSignature: + active: false + FunctionExpressionBody: + active: false MaximumLineLength: active: false + MultilineExpressionWrapping: + active: false TrailingCommaOnCallSite: active: false TrailingCommaOnDeclarationSite: diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index fae9e6b..df43cf1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,8 +2,8 @@ kotlin = "2.2.20" dokka = "2.1.0-Beta" binaryCompabilityValidator = "0.18.0" -toolchainsResolver = "0.10.0" -detekt = "1.23.7" +toolchainsResolver = "1.0.0" +detekt = "2.0.0-alpha.0" mavenPublish = "0.34.0" coroutines = "1.10.1" atomicfu = "0.27.0" @@ -14,8 +14,8 @@ statelyIso = "2.1.0" plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } plugin-dokka = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" } plugin-binaryCompatibilityValidator = { module = "org.jetbrains.kotlinx:binary-compatibility-validator", version.ref = "binaryCompabilityValidator" } -plugin-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" } -plugin-detektFormatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt"} +plugin-detekt = { module = "dev.detekt:detekt-gradle-plugin", version.ref = "detekt"} +plugin-detektKtlintWrapper = { module = "dev.detekt:detekt-rules-ktlint-wrapper", version.ref = "detekt"} plugin-mavenPublish = { module ="com.vanniktech:gradle-maven-publish-plugin", version.ref = "mavenPublish" } coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } @@ -25,4 +25,5 @@ lincheck = { module = "org.jetbrains.kotlinx:lincheck", version.ref = "lincheck" stately-isoCollections = { module = "co.touchlab:stately-iso-collections", version.ref = "statelyIso" } [plugins] -detekt = { id = "io.gitlab.arturbosch.detekt", version.ref = "detekt" } +kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } +detekt = { id = "dev.detekt", version.ref = "detekt" }