-
Notifications
You must be signed in to change notification settings - Fork 6
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
Cannot add sources and javadoc to gradlePluginPublication #25
Comments
Looks like it was a misunderstanding of how the plugin works in this scenario on my part. I have managed to get it working now, however a smaller issue still remains - task dependencies are not configured correctly by the plugin. Namely, the publication fails without this extra input from my earlier snippet
|
Thanks for reporting! I'll check later today, glad you found a workaround. |
I tried to replicate this in MavenDeployer's own deployment, which has: val javadocs = tasks.register<Jar>("dokkaJavadocJar") {
dependsOn(tasks.dokkaJavadoc)
from(tasks.dokkaJavadoc.flatMap { it.outputDirectory })
archiveClassifier.set("javadoc")
}
deployer {
content {
gradlePluginComponents {
kotlinSources()
docs(javadocs)
}
}
} Tasks seem to be properly wired. Could there be a problem in your task definition (e.g. "dokkaJavadocJar" not depending on Here's the build file: https://github.com/deepmedia/MavenDeployer/blob/main/deployer/build.gradle.kts |
Odd, the issue was present with general tasks like jar too. I'll build a reproducer later today. |
In the meantime try upgrading gradle version to latest as the errors I got were gradle configuration validation which has gotten stricter in recent releases. |
I get this error when trying to add sources and docs to the publication
Config file is as follows
Any workarounds until the fix is released?
P.S. Publishing with empty source and javadoc jars work just fine (default configuration of
gradlePluginComponents
).The text was updated successfully, but these errors were encountered: