-
Notifications
You must be signed in to change notification settings - Fork 399
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
Extract non-essential declarations and logic out of dokka-core #2933
Comments
Thanks for creating the issue! I kept it in mind after our discussion, and we just had a technical breakdown meeting about it. We've actually agreed to take a bit of a turn with the The first idea was indeed to break it down into We'll extract all non essential declarations from The idea is so that So after this refactoring, Would you mind if we renamed the issue to represent the outlined refactoring? Something like "Extract non-essential declarations from dokka-core". We'll use this issue to track it then |
To me, 'core' means Dokka Generator - the actual code that will convert source files to an intermediate format that is passed to any present Dokka Plugins, which will eventually produce a format. Plugins can receive data that Dokka Generator creates (which could be another use-case for a core-api artifact). Moving functionality out of core makes sense. I'm not sure it will be able to make the end artifact as slim as a component that only contains the DokkaConfiguration interfaces, but so long as the end result works 👍
Not at all! Go ahead. |
Is your feature request related to a problem? Please describe
Dokkatoo uses a Gradle Worker with classpath isolation to execute the Dokka Generator in Dokka Core.
Dokka Generator is configured via some Kotlin interfaces, that are defined in the same module.
dokka/core/src/main/kotlin/configuration.kt
Lines 133 to 264 in 7753776
Because Dokka Generator and the configuration classes are defined the same module, this tightly couples Dokkatoo to a specific Dokka version. This dependency also drags along Dokka Generator, even though it is not required during Gradle project configuration.
Since Dokkatoo uses classpath isolation to run Dokka Generator, the version of Dokka Generator can be set on the fly.
Describe the solution you'd like
Split the interfaces for Dokka Core configuration into a separate artifact.
org.jetbrains.dokka:dokka-core
- contains Dokka Generator, and depends onorg.jetbrains.dokka:dokka-core-api
org.jetbrains.dokka:dokka-core-api
- contains pure configuration classes and interfaces, without logicDeclaring a feature-variant might be a possible way of doing this https://docs.gradle.org/current/userguide/feature_variants.html, but a more straight-forward way would be do create a separate subproject
Describe alternatives you've considered
Keep on using dokka-core.
Additional context
Related:
Are you willing to provide a PR?
Yes
The text was updated successfully, but these errors were encountered: