kant kodali
01/29/2025, 1:51 AM./gradlew ktlintFormat
> Task :auth:runKtlintFormatOverKotlinScripts FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':auth:runKtlintFormatOverKotlinScripts'.
> A failure occurred while executing org.jlleitschuh.gradle.ktlint.worker.KtLintWorkAction
> HEADER_KEYWORD
Can someone help with this I tried all possible ways and I am running out of options...It is related to this https://github.com/JLLeitschuh/ktlint-gradle/issues/816 and I followed the recommendation in the github issue which is to add the following lines but it still doesnt work. I am using kotlin 2.1.0
configure<KtlintExtension> {
version.set("1.5.0")
}
Vampire
01/29/2025, 3:32 PMauth
where you also apply the ktlint-gradle
plugin and where the error is happening?kant kodali
01/29/2025, 5:29 PMkant kodali
01/29/2025, 5:30 PMplugins {
`kotlin-dsl`
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
}
group = "gov.cdc.prime.reportstream"
repositories {
mavenCentral()
maven { url = uri("<https://repo.spring.io/snapshot>") }
gradlePluginPortal()
}
kotlin {
jvmToolchain(17)
}
dependencies {
val kotlinVersion by System.getProperties()
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
implementation("org.jlleitschuh.gradle.ktlint:org.jlleitschuh.gradle.ktlint.gradle.plugin:12.1.1")
}
so what exactly should I do? @Vampirekant kodali
01/29/2025, 5:30 PMVampire
01/29/2025, 5:35 PMkant kodali
01/29/2025, 5:45 PMmyproject
/buildSrc
/build.gradle.kts
/shared.gradle.kts
/prime-router
/build.gradle.kts
kant kodali
01/29/2025, 5:46 PM./gradlew ktlintFormat
from myproject
Vampire
01/29/2025, 5:47 PM:auth:runKtlintFormatOverKotlinScripts
But there is no project auth
in the structure you just posted.kant kodali
01/29/2025, 5:52 PMmyproject
/buildSrc
/build.gradle.kts
/shared.gradle.kts
/prime-router
/build.gradle.kts
/auth
/build.gradle.kts
/submissions
/build.gradle.kts
kant kodali
01/29/2025, 5:52 PMconfigure<KtlintExtension> {
version.set("1.5.0")
}
Vampire
01/29/2025, 5:53 PMauth
so you probably need the workaround there, yes.Vampire
01/29/2025, 5:54 PMktlint {
version = "1.5.0"
}
unless you are on ancient Gradle versions or do not use the plugins { ... }
block to apply plugins