Skip to content

Commit c70b5a6

Browse files
committed
Exclude host-specific shadow artifact from Maven Central
1 parent 10d0310 commit c70b5a6

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

build.gradle.kts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import com.vanniktech.maven.publish.JavadocJar
22
import com.vanniktech.maven.publish.SourcesJar
3+
import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
34
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
45
import java.util.Locale
56
import org.gradle.api.file.DuplicatesStrategy
@@ -56,6 +57,12 @@ plugins {
5657
id("com.diffplug.spotless") version "8.2.1"
5758
}
5859

60+
// Keep shadow packaging for GitHub releases, but do not expose host-specific
61+
// standalone artifacts in the Maven Central publication.
62+
extensions.configure<ShadowExtension>("shadow") {
63+
addShadowVariantIntoJavaComponent.set(false)
64+
}
65+
5966
fun normalizeProjectVersion(rawValue: String?): String {
6067
val candidate = rawValue?.trim().orEmpty()
6168
if (candidate.isBlank()) {

0 commit comments

Comments
 (0)