Skip to content

Migrate to Dokka2#1783

Merged
geoff-powell merged 1 commit intomasterfrom
gpowell/dokka2
Jul 21, 2025
Merged

Migrate to Dokka2#1783
geoff-powell merged 1 commit intomasterfrom
gpowell/dokka2

Conversation

@geoff-powell
Copy link
Copy Markdown
Contributor

No description provided.

dokkaSourceSets.main {
reportUndocumented = false
skipDeprecated = true
jdkVersion = 17
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tasks.named("dokkaGfm").configure {
outputDirectory = rootProject.file("docs/1.x")
dokka {
dokkaPublications.configureEach {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are multiple they might overwrite each other, choose 1 with .named?

suppress = true
}
perPackageOption {
matchingRegex = "app.cash.paparazzi.internal.*"
Copy link
Copy Markdown
Contributor

@TWiStErRob TWiStErRob Jan 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

. is special char in regex: I think the "correct" syntax in Groovy is

Suggested change
matchingRegex = "app.cash.paparazzi.internal.*"
matchingRegex = /app\.cash\.paparazzi\.internal\..*/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although it will work most of the time with this pattern, it is still not using periods . as proper literals. Meaning any character might match.

This version is most likely the correct one to match app.cash.paparazzi.internal and all possible nested packages:

Suggested change
matchingRegex = "app.cash.paparazzi.internal.*"
matchingRegex = /app\.cash\.paparazzi\.internal(\..*)?/

@geoff-powell can you rebase your migration or was this PR paused on purpose?

@geoff-powell geoff-powell added this to the 2.0.0-alpha02 milestone Apr 11, 2025
outputDirectory = rootProject.file("docs/1.x")
dokka {
dokkaPublications.html {
outputDirectory.set(rootProject.file("docs/1.x"))
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
outputDirectory.set(rootProject.file("docs/1.x"))
outputDirectory = rootProject.file("docs/1.x")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also be 2.x now?

@jrodbx jrodbx modified the milestones: 2.0.0-alpha02, 2.0.0-alpha03 Jun 20, 2025
outputDirectory = rootProject.file("docs/1.x")
dokka {
dokkaPublications.html {
outputDirectory.set(rootProject.file("docs/1.x"))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also be 2.x now?


# Dokka
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

probably better to surface these sooner?

tasks.named("dokkaGfm").configure {
outputDirectory = rootProject.file("docs/1.x")
dokka {
dokkaPublications.html {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dokkaPublications.html {
dokkaPublications.named("html").configure {

outputDirectory.set(rootProject.file("docs/1.x"))
}

dokkaSourceSets.main {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dokkaSourceSets.main {
dokkaSourceSets.named("main").configure {

dokkaSourceSets.main {
reportUndocumented = false
skipDeprecated = true
jdkVersion = libs.versions.javaTarget.get() as int
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

perPackageOption {
prefix = "app.cash.paparazzi.internal"
suppress = true
}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase and keep:

      skipEmptyPackages = true

and convert:

-  includeNonPublic = false
+  documentedVisibilities(VisibilityModifier.Public)
- platform = "jvm"
+ analysisPlatform = KotlinPlatform.JVM
- externalDocumentationLink {
-   url.set(java.net.URL("https://developer.android.com/reference/"))
- }

+ externalDocumentationLinks.register("docs") {
+  url("https://developer.android.com/reference/")
+ }
- sourceLink {
-   localDirectory.set(file("src/main/java"))
-   remoteUrl.set(java.net.URL("https://github.com/cashapp/paparazzi/tree/master/paparazzi/src/main/java"))
-   remoteLineSuffix.set("#L")
- }

+ sourceLink {
+   localDirectory.set(file("src/main/java"))
+   remoteUrl("https://github.com/cashapp/paparazzi/tree/master/paparazzi/src/main/java")
+   remoteLineSuffix.set("#L")
+ }

@geoff-powell geoff-powell force-pushed the gpowell/dokka2 branch 3 times, most recently from 5fa7ddd to ba063b3 Compare July 8, 2025 18:48
@@ -0,0 +1,183 @@
<!DOCTYPE html>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intentionally commit the output?

Copy link
Copy Markdown
Collaborator

@jrodbx jrodbx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, let's land this and fast-follow on any breaks now that we've moved to a 2.x folder.

Also, per @TWiStErRob's comment, looks like the 1.x assets were committed. Assuming that's an accident, let's revert before merge?

mkdocs.yml Outdated
nav:
- 'Overview': index.md
- '1.x API': 1.x/paparazzi/app.cash.paparazzi/index.html
- '1.x API': 1.x/paparazzi/app.cash.paparazzi/index.md
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

making sure this was intentional, is the 1.x no longer using html?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverting

@geoff-powell geoff-powell force-pushed the gpowell/dokka2 branch 4 times, most recently from 01c030a to fe3043e Compare July 21, 2025 19:13
@geoff-powell geoff-powell merged commit ce2aadc into master Jul 21, 2025
22 checks passed
@geoff-powell geoff-powell deleted the gpowell/dokka2 branch July 21, 2025 19:37
with:
name: mkdocs-${{ github.sha }}
path: |
**/docs/
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this addition for? shouldn't this covered in the build section below?

geoff-powell added a commit that referenced this pull request Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants