Michael Marshall
08/18/2021, 11:07 AM./gradlew detektMain
on my Android project. Including this… 😂
error: 'trySend(E): ChannelResult<Unit>' is only available since Kotlin 1.4.30 and cannot be used in Kotlin 1.5
These errors don’t come up when compiling normally, what’s happening here?gammax
08/18/2021, 11:08 AMMichael Marshall
08/18/2021, 11:08 AMgammax
08/18/2021, 11:08 AM1.18.0
?Michael Marshall
08/18/2021, 11:10 AMMichael Marshall
08/18/2021, 11:11 AMtasks.withType<Detekt> {
jvmTarget = "11"
}
detekt {
toolVersion = Dependencies.Libraries.detektVersion
input = files("src/main/java")
config = rootProject.files("buildSrc/detekt.yml")
}
gammax
08/18/2021, 11:11 AM1.18.0
to make it work correctly. The reason is that 1.15.x
was using a older version of Kotlin: https://detekt.github.io/detekt/compatibility.html#detekt-support-commitment
Therefore it’s loading a older version of kotlin-compiler-embeddable and is not able to analyse your code correctly.
We will do a point release soon-ish to fix the issue you’re experiencing with "comments>excludes"
Michael Marshall
08/18/2021, 11:13 AMgammax
08/18/2021, 11:13 AMdetektMain
, yes.gammax
08/18/2021, 11:14 AMMichael Marshall
08/18/2021, 11:15 AMgammax
08/18/2021, 11:15 AMMichael Marshall
08/18/2021, 11:16 AMgammax
08/18/2021, 11:16 AMMichael Marshall
08/18/2021, 11:16 AMMichael Marshall
08/18/2021, 2:50 PMerror: class 'MyClass' is not abstract and does not implement abstract member public abstract fun describeContents(): Int defined in android.os.Parcelable
for a class that has @Parcelize
and lots of error: unresolved reference: someVar
gammax
08/18/2021, 2:51 PMMichael Marshall
08/18/2021, 2:54 PMThis is due to the inability to gather the complete compile classpath from the Android Gradle Plugin (upstream ticket) and can safely be ignored.I’ll just wait for the Kotlin compiler plugin and ignore the errors for now
gammax
08/18/2021, 2:55 PMMichael Marshall
08/18/2021, 2:55 PM