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 issue with javadocJar tasks #788

Merged
merged 2 commits into from
May 26, 2024
Merged

fix issue with javadocJar tasks #788

merged 2 commits into from
May 26, 2024

Conversation

gabrielittner
Copy link
Collaborator

@gabrielittner gabrielittner commented May 25, 2024

This creates a separate javadocJar task per publication. This avoids an issue where Gradle gets confused and thinks the publish task, metadata task or sign task of one publication has an implicit dependency on the task. While this means there is a bit of additional work, zipping should generally be fast and the javadoc (or dokka) generation itself is still just run once.

Comment on lines -156 to -159
// TODO: https://youtrack.jetbrains.com/issue/KT-46466 https://github.com/gradle/gradle/issues/26091
project.tasks.withType(AbstractPublishToMaven::class.java).configureEach { publishTask ->
publishTask.dependsOn(project.tasks.withType(Sign::class.java))
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was just fixing the issue for the signing task but not for the publish and metadata tasks.

"${prefix}EmptyJavadocJar",
JavadocJar::class.java,
) {
it.archiveBaseName.set("$prefix-javadoc")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to set this so that the output has different names per publication, this is just the local file name and doesn't influence how it is published.

@gabrielittner gabrielittner merged commit 42d5235 into main May 26, 2024
9 checks passed
@vanniktech vanniktech deleted the javadoc branch May 26, 2024 08:34
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