-
Notifications
You must be signed in to change notification settings - Fork 415
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
Add debug utility for manually overriding the Dokka configuration JSON #3915
Conversation
35f775e
to
608811d
Compare
Being able to make minor manual modifications to the Dokka configuration is exceptionally useful for local debugging. This should not be used in production, and it is protected by an opt-in API.
608811d
to
3d75dae
Compare
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'm not against to having this, though I don't fully understand, how it could help during local debugging. Could you explain it a bit?
For example, @antohaby and I looked at improving KMP handling. It was convenient to be able to manually modify the Dokka configuration rather than trying to modify the Gradle config that DGP uses to produce the Dokka config. For example, we could manually add/remove files from the dependencies that Dokka Generator analyses, or change the order of the files. Changing the order of the files would be quite difficult to do by modifying the Gradle build config. So, instead we added this util. So we could run |
val dokkaConfiguration = | ||
if (overrideJsonConfig.isPresent) { | ||
logger.warn("w: [$path] Overriding DokkaConfiguration with manualJsonConfig") | ||
DokkaConfigurationImpl(overrideJsonConfig.get()) |
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.
what's manualJsonConfig
? I don't see it anywhere. Perhaps you meant overrideJsonConfig
:)
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.
Thanks! Fixed.
I'm afraid it can be abused in the future. But on the other hand why not? someone can also apply patches to the json files when necessary. |
Being able to make minor manual modifications to the Dokka configuration is exceptionally useful for local debugging.
This should not be used in production, and it is protected by an opt-in API.