Extract common jvm target value, add jvmTarget into documentation. Close #2157 (#2183)

This commit is contained in:
Igor Manushin
2019-12-17 22:10:13 +00:00
committed by M Schalk
parent 5f41ea56e1
commit 6816da044a
2 changed files with 10 additions and 2 deletions

View File

@@ -82,6 +82,12 @@ detekt {
filters = ".*/resources/.*,.*/build/.*"
baseline = file("my-detekt-baseline.xml") // Just if you want to create a baseline file.
}
tasks {
withType<Detekt> {
this.jvmTarget = "1.8"
}
}
```
See [bintray](https://bintray.com/arturbosch/code-analysis/detekt) for releases and [artifactory](https://oss.jfrog.org/artifactory/webapp/#/artifacts/browse/tree/General/oss-snapshot-local/io/gitlab/arturbosch/detekt/detekt-cli/) for snapshots.

View File

@@ -103,10 +103,12 @@ subprojects {
jacoco.toolVersion = jacocoVersion
}
val projectJvmTarget = "1.8"
tasks.withType<Detekt>().configureEach {
exclude("resources/")
exclude("build/")
jvmTarget = "1.8"
jvmTarget = projectJvmTarget
}
val userHome = System.getProperty("user.home")
@@ -164,7 +166,7 @@ subprojects {
}
tasks.withType<KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.jvmTarget = projectJvmTarget
// https://youtrack.jetbrains.com/issue/KT-24946
kotlinOptions.freeCompilerArgs = listOf(
"-progressive",