-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Update to Dokka 2.0.0 #4257
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
Update to Dokka 2.0.0 #4257
Conversation
Otherwise, fails with "Cannot run Project.afterEvaluate(Action) when the project is already evaluated."
NB: not tested, waits for KT-71784
// Workaround for https://github.com/Kotlin/dokka/issues/1833: make implicit dependency explicit | ||
tasks.named("dokkaHtmlPartial") { | ||
tasks.withType<DokkaBaseTask>() { | ||
dependsOn(jvmJar) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please could you try removing this workaround? It shouldn't be necessary in DGPv2.
If ./gradlew :dokkaGenerate
still complains, then please raise an issue.
Co-authored-by: Adam <[email protected]>
knitTask.dependsOn(dokkaTasks) | ||
} | ||
tasks.named("knitPrepare") { | ||
dependsOn("dokka") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the coroutines Gradle config have a task named dokka
? Or should this be dokkaGenerate
?
dokkaPlugin("org.jetbrains.kotlinx:dokka-pathsaver-plugin:$knit_version") | ||
|
||
subprojects.forEach { | ||
if (it.name !in projetsWithoutDokka) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor typo.
if (it.name !in projetsWithoutDokka) { | |
if (it.name !in projectsWithoutDokka) { |
(I made a suggestion to make it easier to see the typo, but maybe other places in the code should be updated.)
) | ||
private fun DokkaExtension.setupDokkaTemplatesDir() { | ||
pluginsConfiguration.html { | ||
templatesDir = file(rootDir.toString().replace('\\', '/') + "/dokka-templates") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootDir.resolve("dokka-templates")
|
||
// TODO: WA for KT-71784 | ||
dokkaSourceSets.matching { it.name == "commonMain" }.configureEach { | ||
suppress.set(true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workaround could be removed after update to Dokka 2.0.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
some minor comments/questions
} | ||
} | ||
|
||
private fun Project.configureExternalLinks() { | ||
tasks.withType<DokkaTaskPartial>() { | ||
dokka { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q: what is the reason why this manual linking to core
artifact exists here at all?
@@ -2,19 +2,14 @@ plugins { | |||
id("kotlinx-knit") | |||
} | |||
|
|||
// TODO check that roots are correct | |||
knit { | |||
siteRoot = "https://kotlinlang.org/api/kotlinx.coroutines" | |||
moduleRoots = listOf(".", "integration", "reactive", "ui") | |||
moduleDocs = "build/dokka/htmlPartial" | |||
dokkaMultiModuleRoot = "build/dokka/htmlMultiModule/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dokkaMultiModuleRoot = "build/dokka/htmlMultiModule/" | |
dokkaMultiModuleRoot = "build/dokka/html/" |
@@ -2,19 +2,14 @@ plugins { | |||
id("kotlinx-knit") | |||
} | |||
|
|||
// TODO check that roots are correct | |||
knit { | |||
siteRoot = "https://kotlinlang.org/api/kotlinx.coroutines" | |||
moduleRoots = listOf(".", "integration", "reactive", "ui") | |||
moduleDocs = "build/dokka/htmlPartial" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moduleDocs = "build/dokka/htmlPartial" | |
moduleDocs = "build/dokka-module/html/module" |
No description provided.