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

disable publication of shadowRuntimeElements variant #2961

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.jetbrains.conventions

import com.github.jengelman.gradle.plugins.shadow.ShadowPlugin

plugins {
id("org.jetbrains.conventions.base")
`maven-publish`
Expand Down Expand Up @@ -56,3 +58,11 @@ publishing {
}
}
}

plugins.withType<ShadowPlugin>().configureEach {
// manually disable publication of Shadow elements https://github.com/johnrengelman/shadow/issues/651#issue-839148311
aSemy marked this conversation as resolved.
Show resolved Hide resolved
// This is done to preserve compatibility and have the same behaviour as previous versions of Dokka.
// For more details, see https://github.com/Kotlin/dokka/pull/2704#issuecomment-1499517930
val javaComponent = components["java"] as AdhocComponentWithVariants
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() }
}