This message was deleted.
# community-support
s
This message was deleted.
c
Looks like the build script is trying to set Kotlin version to 2.0 where there is no matching enumeration element in that plugin.
o
It doesn't make sense. I only change the Gradle version to 8.2. And I never manually set the Kotlin version to 2.0. I think it may relate to a complex composite build. I used a nested composite build. Try to bring similar changes to my open-source project.
c
Possibly a plug-in that is incompatible with Gradle 8.2
o
Ok, I found the issue. There is something wrong with org.jetbrains.dokkadokka analysis1.8.20. Because it embedded a
org.jetbrains.kotlin:kotlin-compiler:1.8.10
via shadow jar. That is the reason why it is working perfectly on Gradle 8.1.1. https://repo1.maven.org/maven2/org/jetbrains/dokka/kotlin-analysis-compiler/1.8.20/kotlin-analysis-compiler-1.8.20.jar (51.8 MB) OMFG.
a
if Dokka is causing problems then you can try using my re-write, Dokkatoo simple smile https://github.com/adamko-dev/dokkatoo/ Itโ€™s much more compatible with Gradle, and keeps classpaths separate, so you wonโ€™t get clashes.
v
Actually I'm not so sure Gradle 8.2 or Dokka are actually the culprits. Since one or two days I'm getting the exact same root error when trying to sync a Gradle 8.0.2 Kotlin/JS project, without any Dokka, in IntelliJ. I just didn't investigate yet
Hm, maybe it indeed is Dokka in your case. Somehow it seems to now use the Kotlin Gradle Plugin 1.8.20 with the embeddable Kotlin Compiler 1.8.10 in my project, though I don't think I changed anything. The KGP then has the
DefaultLanguageSettingsBuilderKt
class that references
KOTLIN_2_0
from a class in the Kotlin compiler which is not yet found in 1.8.10. ๐Ÿ˜•
๐Ÿ‘ 1
But I didn't touch that in the last 3 months or so. ๐Ÿ˜•
And on GitHub Actions, the same build still runs perfectly fine. So at least in my case it has to be something local
Oh, I'm blind, shout-out to build scans. I locally added an
implementation(enforcedPlatform(kotlin("bom")))
. Without that, the
implementation(embeddedKotlin("compiler-embeddable"))
is upgraded to 1.8.20, now it is nailed to 1.8.10 which then breaks it. ๐Ÿ™ˆ
๐Ÿ‘ 1
o
Just wake up and found out they changed a lot in the latest commit https://github.com/Kotlin/dokka/commit/9559158bfeeb274e9ccf1b4563f1b23b42afc493 I will freeze the Gradle version for now and looking forward the new release of dokka โค๏ธ.
I have a new idea of this. I think we could get rid of Gradle's Kotlin version by moving the generation code out of the
initialization
module that my Elucidator shows above. Use a GradleRunner to run a JVM application module.
I will confirm the feasibility of this method when I am free. I'll let you guys know the result here after I try it.
Yeah, I have confirmed that the above method can work really well!