Skip to content

Support Dokka v2 - #75

Merged
philipp94831 merged 61 commits into
masterfrom
fix/dokka
Aug 13, 2026
Merged

Support Dokka v2#75
philipp94831 merged 61 commits into
masterfrom
fix/dokka

Conversation

@philipp94831

Copy link
Copy Markdown
Member

No description provided.

@philipp94831 philipp94831 self-assigned this Jan 28, 2026
@philipp94831 philipp94831 changed the title Upgrade to Gradle 9 Upgrade Dokka plugin Jan 28, 2026
Base automatically changed from feature/gradle-9 to master January 28, 2026 13:23
@philipp94831 philipp94831 changed the title Fix Sonatype plugin for Dokka 2.1 Support Dokka v2 Aug 13, 2026
@philipp94831
philipp94831 marked this pull request as ready for review August 13, 2026 11:35
@philipp94831
philipp94831 enabled auto-merge August 13, 2026 11:38
Comment thread sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt Outdated
@philipp94831
philipp94831 requested a lite review from Copilot August 13, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Dokka v2 compatibility to the Sonatype publishing plugin by wiring Dokka v2’s Javadoc-generation task into the javadocJar artifact, and expands integration testing to cover both Dokka task variants.

Changes:

  • Extend Sonatype publication setup to also consume Dokka v2’s Javadoc publication task output.
  • Add Gradle TestKit integration tests for a Dokka v2 (“dokka-javadoc”) project and a legacy-task (“dokkaJavadoc”) project.
  • Minor import/style cleanups and test resource additions.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt Recognize Dokka v2 Javadoc task name when wiring javadocJar.
sonatype/src/test/kotlin/com/bakdata/gradle/SonatypePluginIT.kt Add integration tests for Dokka v2 and legacy Dokka task behavior; adjust WireMock imports.
sonatype/src/test/resources/Demo.kt Add Kotlin demo source used by TestKit projects.
sonar/src/main/kotlin/com/bakdata/gradle/SonarPlugin.kt Replace wildcard Kotlin DSL imports with explicit imports.
sonar/src/test/resources/DemoTest.java Reorder imports for style/consistency.
Suppressed comments (1)

sonatype/src/test/kotlin/com/bakdata/gradle/SonatypePluginIT.kt:496

  • Same as in testDokka2Project: duplicating every expected upload to match a known double-upload makes the test brittle and locks in buggy behavior. Prefer asserting on the distinct uploaded files so the test remains valid if the duplication is fixed.
                .flatMap { file -> listOf(file, "$file.md5", "$file.sha1", "$file.sha256", "$file.sha512") }
                .flatMap { file -> listOf(file, file) } //FIXME somehow elements are uploaded twice
        assertThat(getUploadedFilesInGroup(wiremock)).containsExactlyInAnyOrderElementsOf(expectedUploads)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread sonatype/src/test/kotlin/com/bakdata/gradle/SonatypePluginIT.kt
Comment thread sonatype/src/main/kotlin/com/bakdata/gradle/SonatypePlugin.kt
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
60.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@philipp94831
philipp94831 disabled auto-merge August 13, 2026 12:01
@philipp94831
philipp94831 merged commit 7ff8ab0 into master Aug 13, 2026
8 of 9 checks passed
@philipp94831
philipp94831 deleted the fix/dokka branch August 13, 2026 12:01
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.

4 participants