-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception in thread "main" java.lang.NoSuchFieldError: FUN_KEYWORD #876
Comments
Have you also updated kotlin to 1.4? |
I also get this error with ktlint 0.38.1 and Kotlin 1.4.0. No problem with Kotlin 1.3.72.
|
Yeah, same here. I upgraded Kotlin to 1.4.0 and I cannot run the klint check anymore using Gradle. |
Do you have |
Could you attach here file that failing with above error? |
I don't know if this is helpful, but ktlint fails on the following file (which is part of a bigger multi-module project): plugins {
application
id("org.springframework.boot")
id("com.gorylenko.gradle-git-properties")
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-data-mongodb")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.cloud:spring-cloud-starter-stream-rabbit")
implementation("org.springframework.cloud:spring-cloud-starter-vault-config")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("io.sentry:sentry-logback")
implementation("mysql:mysql-connector-java")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.cloud:spring-cloud-stream-test-support")
testImplementation("org.spockframework:spock-core")
testImplementation("org.spockframework:spock-spring")
testImplementation("com.h2database:h2")
compileOnly("org.projectlombok:lombok")
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
}
springBoot {
buildInfo()
}
application {
mainClassName = "XXX" // redacted
}
tasks {
jar { enabled = true }
bootJar { archiveClassifier.set("app") }
processResources {
filesMatching(listOf("sentry.properties")) {
expand(project.properties)
}
}
} What might be helpful as well is that I'm not using pinterest/ktlint directly, but rather via JLLeitschuh/ktlint-gradle with the following configuration: ktlint {
version.set("0.38.1")
verbose.set(true)
disabledRules.set(setOf("import-ordering", "no-wildcard-imports"))
} |
I could reproduce it as well on my work project. Most probably related to |
Please check this comment in ktlint-gradle: JLLeitschuh/ktlint-gradle#383 (comment) Most probably this is your case and why it is not working. |
After upgrade ktlint to 38.1 (from 37.2) we get the following error:
thanks
Chen
The text was updated successfully, but these errors were encountered: