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

Add dokkaPlugin configuration to example code #2976

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

covercash2
Copy link

In the process of trying to apply a dokkaPlugin, it was in example code to include this line but not mentioned in the documentation. This is a one line change to add that line to the Kotlin script example. I'm not certain if this also applies to the Maven and Groovy implementations, but I wanted to at least start the conversation

In the process of trying to apply a `dokkaPlugin`, it was in example code to include this line but not mentioned in the documentation. This is a one line change to add that line to the Kotlin script example. I'm not certain if this also applies to the Maven and Groovy implementations, but I wanted to at least start the conversation
Copy link
Contributor

@whyoleg whyoleg left a comment

Choose a reason for hiding this comment

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

Hey!
Sorry for the long delay with review.
In most of the cases the dokkaPlugin accessor for dependencies should be auto-generated by Gradle based on configuration created by Dokka Gradle Plugin.
F.e like in dokka-kotlinAsJava-example we don't need to declare dokkaPlugin.
Still, there are some cases, when Gradle will not generate this accessor. One of such cases is when Dokka Gradle Plugin is not applied to current project (and you configure only subprojects) or when it's applied not via plugins block.
This case is shown in dokka-versioning-multimodule-example.
Overall, current Gradle guidelines are suggesting not to use such approach for configuration. But still, there are other cases when dokkaPlugin accessor is not generated, so may be it will be good to add a note in documentation, something like:

  • If dokkaPlugin is shown red/unavailable it's possible to add val dokkaPlugin by configurations before dependencies block as Gradle failed to generate accessor in this case.

Regarding Groovy: there should be no such issues, as there all accessors are resolved dynamically.
Regarding Maven: there should be no such issues, as the configuration there is different from Gradle.

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.

None yet

2 participants