Skip to content

Fix for JVM 17 & Kotlin 1.6.x Support #4813

Answered by itd-pal
itd-pal asked this question in Q&A
Discussion options

You must be logged in to vote

No I dont change the Kotlin version.

Start config: detekt v.1.20.0

detekt {
    toolVersion = "${rootProject.extra["detektVersion"]}"
    source = files("$projectDir/src/main/kotlin", "$projectDir/src/test/kotlin")
    config = files("$projectDir/detekt-overrides.yml")
    buildUponDefaultConfig = true
}

Config

The only change I do is:

version = "0.0.1-SNAPSHOT"
tasks.withType<KotlinCompile> {
    kotlinOptions {
        sourceCompatibility = "11"
        jvmTarget = "11"
    }
}

Result:

server$ ./gradlew detekt --stacktrace
> Task :detekt FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':detekt'.
> Invalid value passed to --jvm-target

* T…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@itd-pal
Comment options

@cortinico
Comment options

@rocketraman
Comment options

@rocketraman
Comment options

@itd-pal
Comment options

Answer selected by itd-pal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants