diff options
author | Harsh Shandilya <me@msfjarvis.dev> | 2022-07-17 13:54:06 +0530 |
---|---|---|
committer | Harsh Shandilya <me@msfjarvis.dev> | 2022-07-17 13:57:13 +0530 |
commit | af362dd6e3072100dfb8cce35edb7fe6b1fe9264 (patch) | |
tree | ee8c956402b3b0749f4c3749eb244ca112c727e4 /build-logic/kotlin-plugins/src | |
parent | 584670ae5bf9373aaa12f82d6eab417929d6bca7 (diff) |
gradle: add `detekt` as a dependency to the `check` task
Diffstat (limited to 'build-logic/kotlin-plugins/src')
-rw-r--r-- | build-logic/kotlin-plugins/src/main/kotlin/app/passwordstore/gradle/KotlinCommonPlugin.kt | 4 |
1 files changed, 4 insertions, 0 deletions
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<Project> { .asFile } project.tasks.run { + project.pluginManager.withPlugin("base") { + named(LifecycleBasePlugin.CHECK_TASK_NAME).configure { this.dependsOn(named("detekt")) } + } withType<JavaCompile>().configureEach { sourceCompatibility = JavaVersion.VERSION_11.toString() targetCompatibility = JavaVersion.VERSION_11.toString() |