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

Fix external documentation link default values #3812

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

Conversation

adam-enko
Copy link
Member

@adam-enko adam-enko commented Sep 19, 2024

Prevent the default value of true from overriding the specific values provided from the top level Dokka DSL.

KT-70908

@adam-enko adam-enko added the runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin label Sep 19, 2024
@adam-enko adam-enko added this to the Dokka 2.0.0 milestone Sep 19, 2024
@adam-enko adam-enko marked this pull request as ready for review September 19, 2024 10:56
@@ -218,7 +218,7 @@ constructor(
}

maybeCreate("jdk") {
enabled.convention([email protected])
enabled.set([email protected])

Choose a reason for hiding this comment

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

Hm, why does convention not work here?

Copy link
Member Author

@adam-enko adam-enko Sep 19, 2024

Choose a reason for hiding this comment

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

I believe it gets overridden by the configureEach {} above, which sets the convention to true.

externalDocumentationLinks {
configureEach {
enabled.convention(true)
packageListUrl.convention(url.map { it.appendPath("package-list") })
}

Choose a reason for hiding this comment

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

Could it skip these known names like if(name !in setOf("jdk", "kotlinStdlib", "androidSdk", "androidX"))?

Usually using actual values instead of conventions in entities that could be configured by users are a code smell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runner: Gradle plugin An issue/PR related to Dokka's Gradle plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants