Skip to content

Commit

Permalink
disable publication of shadowRuntimeElements variant
Browse files Browse the repository at this point in the history
  • Loading branch information
aSemy committed Apr 16, 2023
1 parent 21afcb4 commit 379ab23
Showing 1 changed file with 8 additions and 0 deletions.
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,9 @@ publishing {
}
}
}

plugins.withType<ShadowPlugin>().configureEach {
// manually disable publication of Shadow elements https://github.com/johnrengelman/shadow/issues/651#issue-839148311
val javaComponent = components["java"] as AdhocComponentWithVariants
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) { skip() }
}

0 comments on commit 379ab23

Please sign in to comment.