From af362dd6e3072100dfb8cce35edb7fe6b1fe9264 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Sun, 17 Jul 2022 13:54:06 +0530 Subject: gradle: add `detekt` as a dependency to the `check` task --- .../src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build-logic/kotlin-plugins/src') diff --git a/build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt b/build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt index 7327e8af..726ec6a1 100644 --- a/build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt +++ b/build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt @@ -15,6 +15,7 @@ import org.gradle.api.tasks.testing.Test import org.gradle.api.tasks.testing.logging.TestLogEvent import org.gradle.kotlin.dsl.configure import org.gradle.kotlin.dsl.withType +import org.gradle.language.base.plugins.LifecycleBasePlugin import org.jetbrains.kotlin.gradle.tasks.KotlinCompile @Suppress("Unused") @@ -34,6 +35,9 @@ class KotlinCommonPlugin : Plugin { .asFile } project.tasks.run { + project.pluginManager.withPlugin("base") { + named(LifecycleBasePlugin.CHECK_TASK_NAME).configure { this.dependsOn(named("detekt")) } + } withType().configureEach { sourceCompatibility = JavaVersion.VERSION_11.toString() targetCompatibility = JavaVersion.VERSION_11.toString() -- cgit v1.2.3