gradle: add detekt
as a dependency to the check
task
This commit is contained in:
parent
584670ae5b
commit
af362dd6e3
1 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue