Remove noShadowPublish (#3426)
This commit is contained in:
parent
47c8a9bfa5
commit
d53e62b4dc
|
|
@ -1,5 +1,3 @@
|
|||
import com.github.jengelman.gradle.plugins.shadow.ShadowExtension
|
||||
|
||||
plugins {
|
||||
`maven-publish`
|
||||
signing
|
||||
|
|
@ -8,18 +6,11 @@ plugins {
|
|||
publishing {
|
||||
publications {
|
||||
register<MavenPublication>("maven") {
|
||||
if (tasks.names.contains("shadowJar") && findProperty("noShadowPublish") != true) {
|
||||
the<ShadowExtension>().component(this)
|
||||
// These two are here just to satisfy Maven Central
|
||||
artifact(tasks["sourcesJar"])
|
||||
artifact(tasks["javadocJar"])
|
||||
} else {
|
||||
plugins.withId("java-platform") {
|
||||
from(components["javaPlatform"])
|
||||
}
|
||||
plugins.withId("java-library") {
|
||||
from(components["java"])
|
||||
}
|
||||
plugins.withId("java-platform") {
|
||||
from(components["javaPlatform"])
|
||||
}
|
||||
plugins.withId("java-library") {
|
||||
from(components["java"])
|
||||
}
|
||||
|
||||
versionMapping {
|
||||
|
|
|
|||
|
|
@ -41,3 +41,12 @@ jar {
|
|||
|
||||
dependsOn shadowJar
|
||||
}
|
||||
|
||||
// Because shadow does not use default configurations
|
||||
publishing {
|
||||
publications {
|
||||
maven {
|
||||
project.shadow.component(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ CopySpec isolateSpec(Collection<Project> projectsWithShadowJar) {
|
|||
|
||||
//Includes everything needed for OOTB experience
|
||||
shadowJar {
|
||||
archiveClassifier.set("all")
|
||||
def projectsWithShadowJar = [project(':instrumentation'), project(":javaagent-exporters")]
|
||||
projectsWithShadowJar.each {
|
||||
dependsOn("${it.path}:shadowJar")
|
||||
|
|
@ -62,11 +63,15 @@ shadowJar {
|
|||
|
||||
//Includes instrumentations, but not exporters
|
||||
task lightShadow(type: ShadowJar) {
|
||||
archiveClassifier.set("")
|
||||
dependsOn ':instrumentation:shadowJar'
|
||||
def projectsWithShadowJar = [project(':instrumentation')]
|
||||
with isolateSpec(projectsWithShadowJar)
|
||||
}
|
||||
|
||||
// lightShadow is the default classifier we publish so disable the default jar.
|
||||
jar.enabled = false
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
|
|
|
|||
|
|
@ -76,3 +76,12 @@ afterEvaluate {
|
|||
dependsOn shadowJar
|
||||
}
|
||||
}
|
||||
|
||||
// Because shadow does not use default configurations
|
||||
publishing {
|
||||
publications {
|
||||
maven {
|
||||
project.shadow.component(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue