[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Kotlin and OpenJDK 8 in Bookworm?



Le 2023-01-26 17:17, Emmanuel Bourg a écrit :

I've been working on Kotlin lately, trying to make it build with OpenJDK 17
only, and hopefully have it included in Bookworm.

Long story short, after days banging my head on this issue, I don't think
it's possible.

I take that back, kotlin now builds with OpenJDK 17 and is on track to
migrate to testing.

This comes at a price though, besides my sanity I had the sacrifice the
Android support (the Android dependencies still build with OpenJDK 8) and
the -Xuse-javac option which hasn't been updated for OpenJDK 17 yet [1].

It isn't extensively tested yet but the resulting package is good enough to
rebuild itself.

The next hurdle is to enable the Kotlin DSL in Gradle. I've packaged the
version of gradle-kotlin-dsl that came with Gradle 4.4 but it doesn't work.
When Gradle encounters a .kts file an obscure error is thrown
(NoDescriptorForDeclarationException: Descriptor wasn't found for
declaration SCRIPT). I have no idea how to fix this, and I now think this
is a dead end anyway. gradle-kotlin-dsl uses internal Gradle APIs that
changed in Gradle 5, so if we use the Kotlin syntax to upgrade Gradle,
it'll break immediately and we'll be unable to rebuild Gradle.

The solution I think is to upgrade Gradle to the first version with the
Kotlin DSL source code merged, which is Gradle 5.3. I leave that to someone
else.

Emmanuel Bourg

[1] https://youtrack.jetbrains.com/issue/KT-56235


Reply to: