[3.4.0-map-sdk] fix bug
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
plugins {
|
||||
id("io.gitlab.arturbosch.detekt") version "1.21.0"
|
||||
id("io.gitlab.arturbosch.detekt") version "1.15.0"
|
||||
}
|
||||
|
||||
def pmdConfigPath = rootProject.file("codequality").path
|
||||
@@ -8,9 +8,12 @@ detekt{
|
||||
//将配置文件应用于detekt的默认配置文件之上
|
||||
buildUponDefaultConfig = true
|
||||
source = files(
|
||||
"src/main/kotlin",
|
||||
"src/main/java",
|
||||
"src/jinlvvan/java",
|
||||
"src/driverm1/java"
|
||||
"src/jinlvvan/kotlin",
|
||||
"src/driverm1/java",
|
||||
"src/driverm1/kotlin"
|
||||
)
|
||||
//规则集
|
||||
config.setFrom("${pmdConfigPath}/detekt.yml")
|
||||
@@ -27,6 +30,10 @@ detekt{
|
||||
// ignoredVariants = ["productionRelease"]
|
||||
}
|
||||
|
||||
dependencies {
|
||||
detektPlugins "io.gitlab.arturbosch.detekt:detekt-formatting:1.21.0"
|
||||
}
|
||||
|
||||
tasks.detekt.jvmTarget = "1.8"
|
||||
|
||||
tasks.named("detekt").configure {
|
||||
@@ -36,4 +43,11 @@ tasks.named("detekt").configure {
|
||||
html.required.set(true)
|
||||
html.outputLocation.set(destination)
|
||||
}
|
||||
}
|
||||
|
||||
project.afterEvaluate {
|
||||
if (tasks.findByName("preBuild") != null) {
|
||||
project.preBuild.dependsOn tasks.findByName("detekt")
|
||||
println("project.preBuild.dependsOn tasks.findByName(\"detekt\")")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user