Skip to content
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

Automatic versioning through a Maven repository #3977

Open
CLOVIS-AI opened this issue Dec 27, 2024 · 1 comment
Open

Automatic versioning through a Maven repository #3977

CLOVIS-AI opened this issue Dec 27, 2024 · 1 comment
Labels
enhancement An issue for a feature or an overall improvement

Comments

@CLOVIS-AI
Copy link
Contributor

Is your feature request related to a problem? Please describe

Dokka offers the Versioning plugin to allow displaying multiple versions of the documentation in a single website. This is great, however setting it up is a bit complex and inconvenient, in particular because it requires having access to previously-built artifacts, which are usually not easy to access through a CI pipeline.

Describe the solution you'd like

An idiomatic library deployment to MavenCentral includes a documentation artifact (the traditional -javadoc JAR). Therefore, we can use MavenCentral as the source of previous versions' documentation.

It would be great to add an option to the Versioning plugin, like autoDownloadPreviousVersionsFromMaven.set(true) or similar, that would download previous versions of each module's documentation from its previous published versions on Central or another Maven repository that has documentation artifacts.

Describe alternatives you've considered

Apollo GraphQL has a custom convention plugin that does something like this. However, it seems to require publishing the documentation to a different coordinate rather than use each artifact's already published documentation. Also, it is very ad-hoc, whereas I believe this feature should be upstreamed to benefit everyone using Dokka.

@CLOVIS-AI CLOVIS-AI added the enhancement An issue for a feature or an overall improvement label Dec 27, 2024
@martinbonnin
Copy link
Contributor

it seems to require publishing the documentation to a different coordinate rather than use each artifact's already published documentation

Indeed it does. I believe the main issue is that the versioning plugin requires the "multi-module" HTML files and I haven't found a way to reconstruct that from individual modules kdoc.

My favourite solution would be to publish an "IR-like", machine-readable kdoc zip alongside each module instead of HTML (See also #621, #1298, #2787). Then the HTML conversion step could take each module data and reconstruct a multi-version, multi-module documentation.

That'd mean any styling change would apply to older versions retro-actively. That also means the "IR" needs to be somewhat stable so that older "IRs" can be read with newer dokka.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An issue for a feature or an overall improvement
Projects
None yet
Development

No branches or pull requests

2 participants