Describe the bug
I have a multimodule project
<project root>
|- core
| |- build.gradle
| |- src/main/kotlin...
|- server
| |- src/main/kotlin...
| |- build.gradle
|- build.gradle
When I run
gradlew :server:dokkaHtml --full-stacktrace
I get java.lang.ClassNotFoundException: kotlin.KotlinNothingValueException (Full stacktrace: https://pastebin.com/raw/nD7wapGd)
Expected behaviour
Build successful. Site is in /build/dokka directory
Dokka configuration
Configuration of dokka used to reproduce the bug
server/build.gradle
plugins {
id 'org.jetbrains.dokka'
}
tasks.dokkaHtml {
outputDirectory = "$buildDir/dokka"
}
settings.gradle
pluginManagement {
repositories {
gradlePluginPortal()
jcenter()
}
}
Installation
Additional context
Could you please paste outputs of ./gradlew :server:dependencies --configuration dokkaHtmlPlugin and ./gradlew :server:dependencies --configuration dokkaHtmlRuntime?
And yet another thing! Is this possible for you to check if the problem persists after updating the kotlin plugin to 1.4.0-rc?
And yet another thing! Is this possible for you to check if the problem persists after updating the kotlin plugin to 1.4.0-rc?
Yes, bump version to 1.4.0-rc fixed that problem.
Is it going to be solved using Kotlin 1.3.x?
Seems like it is no more required, but still
If I rollback Kotlin version and execute these commands thats it:
Could you please paste outputs of
./gradlew :server:dependencies --configuration dokkaHtmlPlugin
dokkaHtmlPlugin
\--- org.jetbrains.dokka:dokka-base:1.4.0-rc
+--- org.jetbrains.dokka:dokka-analysis:1.4.0-rc
| +--- org.jetbrains.dokka:kotlin-analysis-intellij:1.4.0-rc
| +--- org.jetbrains.dokka:kotlin-analysis-compiler:1.4.0-rc
| \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.0-rc -> 1.3.60
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.60
| | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.60
| | \--- org.jetbrains:annotations:13.0
| \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.60
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.60 (*)
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.0-rc -> 1.3.60 (*)
+--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0-rc -> 1.3.60 (*)
+--- org.jetbrains.kotlin:kotlin-reflect:1.4.0-rc -> 1.3.60
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.60 (*)
+--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.3.8-1.4.0-rc
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.0-rc -> 1.3.60 (*)
| \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4.0-rc -> 1.3.60
+--- org.jsoup:jsoup:1.12.1
\--- org.jetbrains.kotlinx:kotlinx-html-jvm:0.7.1-1.4-M3
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4-M3 -> 1.3.60 (*)
\--- org.jetbrains.kotlin:kotlin-stdlib-common:1.4-M3 -> 1.3.60
and
./gradlew :server:dependencies --configuration dokkaHtmlRuntime?
dokkaHtmlRuntime
\--- org.jetbrains.dokka:dokka-core:1.4.0-rc
+--- org.jetbrains:markdown:0.1.45
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.41 -> 1.3.60
| +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.60
| \--- org.jetbrains:annotations:13.0
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.0-rc -> 1.3.60
| +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.60 (*)
| \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.60
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.60 (*)
+--- org.jetbrains.kotlin:kotlin-reflect:1.4.0-rc -> 1.3.60
| \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.60 (*)
+--- org.jsoup:jsoup:1.12.1
\--- com.fasterxml.jackson.module:jackson-module-kotlin:2.11.1 -> 2.10.2
+--- com.fasterxml.jackson.core:jackson-databind:2.10.2
| +--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
| \--- com.fasterxml.jackson.core:jackson-core:2.10.2
+--- com.fasterxml.jackson.core:jackson-annotations:2.10.2
\--- org.jetbrains.kotlin:kotlin-reflect:1.3.61 -> 1.3.60 (*)
@vladimirshefer Unfortunately, this kind of issues seem to arise because of the overall fact that Kotlin 1.4 is not compatible with Kotlin 1.3.*
We cannot allocate a lot of work into trying to work around those limitations, but we will at least have a look at this and see how much effort it would be. We, in theory, should support simple projects even with Kotlin 1.3.x (see our integration tests)
Hi All
I had the same issue. Instead of putting pressure on the team for backward compatibility may i suggest the following solution.
configurations.all {
resolutionStrategy.eachDependency {
if (name.contains("dokka")) {
if (requested.group == "org.jetbrains.kotlin" && requested.version != "1.4.10") {
useVersion("1.4.10")
because("Dokka plugin requires kotlin version 1.4.10")
}
} else {
if (requested.group == "org.jetbrains.kotlin" && requested.version != "1.3.72") {
useVersion("1.3.72")
because("Gradle 6.7 uses version 1.3.72")
}
}
}
}
Please let me know if this fixes your issues
Gradle is very flexible and I loves its dependency management a lot
@kpramesh2212 thank you for your answer.
I'll try this solution.
Did you use this in production?
@vladimirshefer
Yes I am using it in one of my open-source plugin
Most helpful comment
Hi All
I had the same issue. Instead of putting pressure on the team for backward compatibility may i suggest the following solution.
Please let me know if this fixes your issues
Gradle is very flexible and I loves its dependency management a lot