-
Notifications
You must be signed in to change notification settings - Fork 419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fail to generate Javadoc with Java 10 (Doclet missing?) #294
Comments
I guess this issue is related to the not existing linked also in the following issue: |
the linked issue seemed to be fixed. Is there a new status for dokka? |
Still not working with JDK 10. As a workaround I use JDK 8. |
Problem with missing |
Is there any status update on this? I would also benefit from this as it would be needed to make spring-auto-restdocs java 10 compatible. |
Looks like you need this: https://docs.oracle.com/javase/9/docs/api/jdk/javadoc/doclet/package-summary.html#migration . However, no idea how to support both Java <= 9 and Java >= 10 at the same time. |
Unfortunately due to Kotlin/dokka#294 the build will be limited to jdk8 for now.
Unfortunately due to Kotlin/dokka#294 the build will be limited to jdk8 for now.
Still broken on Java 11 |
This effectively prevents one to build Kotlin JARs with JDK10+ and deploy them to Maven Central, since Maven Central requires javadoc artifacts (produced by Dokka). Huge blocker! |
The missing
Results in: The |
For jdk 11+, look at /en/java/javase instead of /javase For jdk 10+, look at element-list instead of package-list, and parse the module out to generate the correct class link. Fixes Kotlin#416 Might also fix Kotlin#294
Letting travis build with `./gradlew build` was making dokka fail, due to Kotlin/dokka#294 This may be reverted if Travis runs with JDK < 10 or when that issue is fixed.
Yes, we still don't support the new Doclet. |
@kamilok1965 Thanks for the info. Could you add that mention in the README file? Currently it just seems like it should work and it's a waste of time for everyone. |
@lennartj said:
I ran into the same thing when using Maven. I tried converting a project to Gradle 6.3 which happily creates a nearly empty java {
withJavadocJar()
withSourcesJar()
} It puts nothing in If you have an all Kotlin project, you can even throw your dokka HTML into a javadoc-jar. java {
// withJavadocJar() // REMOVED THIS LINE
withSourcesJar()
}
tasks {
val dokka by getting(DokkaTask::class) {
outputFormat = "html"
outputDirectory = "$buildDir/dokka"
}
}
tasks.register<Jar>("javadocJar") {
archiveClassifier.set("javadoc")
dependsOn("dokka")
from("$buildDir/dokka")
} I have maybe 8 hours of Gradle experience. I am not an expert. This is NOT a fix, or even a good workaround, but it might be better than no workaround. I'll keep updating my build file here as I learn more: https://github.com/GlenKPeterson/Indented/blob/master/build.gradle.kts |
I did not manage to use Dokka when pushing a JDK 11 Kotlin project to OSS via Maven release. Any for this? Is there an estimate release date for Dokka 0.11 (being compliant with JDK 11)? |
Dokka can be used with JDK 11, only the javadoc output format won't work (which is not needed for OSS, you can provide documentation in any format). |
It is a bug in Dokka, see Kotlin/dokka#294 Signed-off-by: Yahor Berdnikau <[email protected]>
Are there any updates on this regarding this blog entry? https://blog.jetbrains.com/kotlin/2020/08/dokka-preview-based-on-kotlin-1-4-0-rc/ |
@daviddenton i can confirm both |
* Allow to switch between kotlin and kotlin-dev versions. Signed-off-by: Yahor Berdnikau <[email protected]> * Replace 'com.vanniktech.maven.publish' with 'maven-publish' plugin. This allows to publish snapshots build against kotlin dev version. Signed-off-by: Yahor Berdnikau <[email protected]> * Add shodowJar to publication. Signed-off-by: Yahor Berdnikau <[email protected]> * Remove MavenLocalTest repository. This repository is not needed, 'maven-publish' actually adds it automatically. Signed-off-by: Yahor Berdnikau <[email protected]> * Update verification metadata. Signed-off-by: Yahor Berdnikau <[email protected]> * Fix repositories order. Signed-off-by: Yahor Berdnikau <[email protected]> * Add verification metadata for kotlin dev dependencies. * Update CI configuration. Signed-off-by: Yahor Berdnikau <[email protected]> * Fix publishing task. It will use proper dependency on maven publish tasks. Signed-off-by: Yahor Berdnikau <[email protected]> * Update documentation. Signed-off-by: Yahor Berdnikau <[email protected]> * Disable javadoc generation on Java 10+ versions. It is a bug in Dokka, see Kotlin/dokka#294 Signed-off-by: Yahor Berdnikau <[email protected]> * Remove unused kotlinx repository. Signed-off-by: Yahor Berdnikau <[email protected]> * Update Kotlin development version to 1.4.0-rc. Signed-off-by: Yahor Berdnikau <[email protected]> * Use defined version to set kotlin dev snapshot version. Signed-off-by: Yahor Berdnikau <[email protected]>
Works for me too. Yay! Thank you so much! I'm kind of a Gradle noob, so my example is a little kludgy - any help would be appreciated! I have to specify ./gradlew clean assemble dokkaJar publish Then in build.gradle.kts: plugins {
`java-library`
`maven-publish`
signing
id("org.jetbrains.dokka") version "1.4.0-rc"
kotlin("jvm") version "1.4.0"
}
java {
// withJavadocJar()
withSourcesJar()
}
// I made up a task named dokkaJar
tasks.register<Jar>("dokkaJar") {
archiveClassifier.set("javadoc")
dependsOn("dokkaJavadoc")
from("$buildDir/dokka/javadoc/")
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
afterEvaluate {
artifactId = tasks.jar.get().archiveBaseName.get()
}
// Adds the dokka javadoc jar to this publication so it gets signed.
artifact(tasks["dokkaJar"]) I deleted (because tasks {
val dokka by getting(DokkaTask::class) {
outputFormat = "html"
outputDirectory = "$buildDir/dokka"
}
} |
I am experiencing an issue with dokka, same as the other posters. The following will result in an error. Anyone with a resolution? gradle code:
error:
|
@drxeno02 the old Dokka versions are not supported, please switch to |
@kamildoleglo Hello friend. Sorry, I may not be understanding. Isn't the latest dokka plugin Ref- |
No, you can see the full document of plugin version |
did you find any solution? |
When using Dokka 9.16 with JDK-10 the generation with
outputFormat=javadoc
fails with the following message:I guess its due to the removal of the old HtmlDoclet in Java 10.
The text was updated successfully, but these errors were encountered: