-
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
update: DGPV2 migration guide #4025
base: master
Are you sure you want to change the base?
Conversation
f4b0526
to
fb10fbd
Compare
docs/topics/dokka-migration.md
Outdated
``` | ||
```kotlin | ||
plugins { | ||
kotlin("jvm") version "1.9.25" |
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.
Maybe we could use here the latest stable Kotlin version (2.1.10)?
docs/topics/dokka-migration.md
Outdated
|
||
```kotlin | ||
dokka { | ||
this: DokkaExtension |
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.
It looks like something is broken in the snippet. The old one was:
tasks.dokkaHtml {
dokkaSourceSets {
configureEach {
externalDocumentationLink {
url = URL("https://example.com/docs/")
packageListUrl = File("/path/to/package-list").toURI().toURL()
}
}
}
}
docs/topics/dokka-migration.md
Outdated
// build.gradle.kts | ||
|
||
plugins { | ||
id("org.jetbrains.dokka") version "2.0.0-Beta" |
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.
We could drop Beta
from version
} | ||
``` | ||
|
||
### Configure custom Dokka plugins |
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.
Why do we promote the feature in the migration guide? I expect the minimal required amount of material to move projects from DGP v1 to DGP v2.
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 is part of the feedback we got to update the migration guide. You can see in the feedback issue the comment addressed by @adam-enko as pointed here.
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.
May be it makes more sense to only add a link to an example configuration which will be introduced in #3871 (and so possibly copy part of the text there to readme) instead of this big section here, as we don’t really want to promote using custom Dokka plugins :)
docs/topics/dokka-migration.md
Outdated
@OptIn(DokkaInternalApi::class) | ||
abstract class DokkaScriptsPluginParameters @Inject constructor( | ||
name: String | ||
) : DokkaPluginParametersBaseSpec(name, "ca.solostudios.dokkascript.plugin.DokkaScriptsPlugin") { |
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.
Who is ca.solostudios
? I think we should avoid mentioning external namespaces.
docs/topics/dokka-migration.md
Outdated
includes.from("README.md") | ||
sourceLink { | ||
localDirectory.set(file("src/main/kotlin")) | ||
remoteUrl("https://github.com/your-repo") |
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.
For consistency (set
in all properties), maybe we could use remoteUrl.set(URI("https://github.com/your-repo"))
.
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! Thank you!
There are some small comments from me, but overall looks good!
dokka { | ||
dokkaPublications.html { | ||
outputDirectory.set(layout.buildDirectory.dir("dokkaDir")) | ||
The ability to set an output directory and include additional files, such as `README.md`, is still supported in |
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.
I believe that the initial concern of user for this feedback (https://youtrack.jetbrains.com/issue/KT-72053/Dokka-DGP-v2-migration-guide-feedback#focus=Comments-27-10821114.0-0) was that previously Dokka configuration was split between dokkaHtml
task and dokkaHtmlMultiModule
task but with DGPv2 we do have single place (dokka
extension) to configure both type of projects.
So I think that may be it would make sense to rephrase this to point to this moment instead of still supported
wording.
|
||
New configuration: | ||
|
||
DGP v2 replaces the JSON-based configuration with a type-safe DSL that is compatible with incremental builds. |
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: we could additionally place a link to a versioning example here—https://github.com/Kotlin/dokka/tree/master/examples/gradle-v2/versioning-multimodule-example
} | ||
``` | ||
|
||
### Configure custom Dokka plugins |
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.
May be it makes more sense to only add a link to an example configuration which will be introduced in #3871 (and so possibly copy part of the text there to readme) instead of this big section here, as we don’t really want to promote using custom Dokka plugins :)
This PR contains updates for the DGP V2 Migration guide.
The additions to the Migration guide are:
externalDocumentationLinks
has changed API and it's missing in migration guideOutput
directory for additional filessourceLink
Additionally, there are some fixes in the code format and indentation. Plus, the content within "Adjust configuration options" is now broken into single subsections instead of bullet points.
KT-72053 [Dokka] DGP v2 migration guide feedback