I'm having a hard time trying to make detekt 1.7.0...
# detekt
t
I'm having a hard time trying to make detekt 1.7.0+ work with Spring and java 11. If I go to java 8, it works. If I go to 1.6.0, it works. If I use java 11 and detekt 1.7.0+, sometimes it doesn't load
java.sql.Date
, sometimes it can't find
org.yaml.snakeyaml.nodes.Tag
. Attached the smallest
build.gradle.kts
that I was able to reproduce the problem. Just add an empty .kt file under
src/main/kotlin
and you'll see the error. Running gradle 6.3
Should I fill an issue for this?
b
This is strange, we test detekt vs java 11 and it works. Do you have a test project to reproduce the error?
m
@Brais Gabin OP provided a build.gradle.kts file, and claimed analyzing any .kt file would cause the error. @Thiago Nerys Unrelated. Since you're using the latest Gradle, consider not using the Spring Dependency Management plugin anymore. The Gradle platform support is much better, and is much more intuitive if you ever want to override the Spring Boot changes. Here's a useful article. https://www.nexocode.com/blog/posts/spring-dependencies-in-gradle/
t
Ok, I'll look into it. Thanks for the advice.
@Mike I was able to switch to that approach. Wonder why official Spring and Gradle tutorials doesn't use that.
m
I wonder the same thing. And I think the author of the article asks that, too. I don't know as it's much cleaner. I expected the Spring Dependency plugin Readme to mention it, too. But it doesn't, so im at least letting people know when I can as it's much cleaner.