When upgrading dokka from version 1.4.0-rc to 1.4.0, we start to see "Val cannot be reassigned" errors in this code.
Strangely, when navigating to the definition of e.g. jdkVersion I see
@Input
override var jdkVersion: Int = DokkaDefaults.jdkVersion
So it is a var, not a val.
Any idea what's going on?
https://github.com/Kotlin/dokka/blob/cc3d4872f70cfebaf5d85c72af0030f526671915/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilder.kt#L72
It is a val indeed. We've migrated to Gradle properties and they unfortunately doesn't allow using = in kts scripts. You have to use jdkVersion.set(...) instead
Oh, that sounds like a step backwards to me, at least from a user-perspective 馃槙 But anyway thanks a lot for the super-fast response!
PS: Why does https://github.com/Kotlin/dokka/releases/tag/1.4.0 have "Alpha" in the title? It sounds a but like this would be version "1.4.0 Alpha".
Oh, that sounds like a step backwards to me, at least from a user-perspective 馃槙
Yes, you're right. This is certainly less convenient at first sight.
But those Property/Provider APIs from Gradle are not only powerful, they were the only way for us to effectively get rid of a lot of problems we had in our Gradle plugin.
The inconvenience is already known by the Gradle team and them are thinking about solving it for you!
Feel free to track this issue: https://github.com/gradle/gradle/issues/9268
Regarding the version number:
The version number of Dokka is just aligned with the bundled Kotlin version (and we recommend using the same version for both, Dokka and Kotlin Gradle Plugin). Dokka, However, is not considered stable right now. That is the reason why we put maturity into the release title.
But the recently released "1.4.0" version is the successor of the previous "1.4.0-rc" version, and the former mentioned is "more mature" in that sense, right? Or should I stick with version "1.4.0-rc" for now?
Ok, this blog post somewhat explains it as it says "We previously released Dokka on Kotlin 1.4.0-RC". But still quite confusing IMO that an "Alpha" comes after an "RC" as it's usually the other way around.
The 1.4.0-rc was just named after the Kotlin version 1.4.0-rc! Dokka 1.4.0-rc and Dokka 1.4.0 are both considered alpha in their maturity! We will try to improve our communication here! This is a known issue 鈽猴笍
Ah, thanks for the clarification. IMO you really shouldn't name your version (only) after the version of a dependency, even if it's a central one. Note to myself, these releases probably should have been named "dokka-1.4.0-alpha1-kotlin-1.4.0-rc" and "dokka-1.4.0-alpha2-kotlin-1.4.0" 馃槈