Skip to content

Commit b495ac8

Browse files
LikeTheSaladtrask
andauthored
Shadowing generated proto java sources (#1146)
Co-authored-by: Trask Stalnaker <[email protected]>
1 parent b0e2797 commit b495ac8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

disk-buffering/build.gradle.kts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
12
import ru.vyarus.gradle.plugin.animalsniffer.AnimalSniffer
23

34
plugins {
45
id("otel.java-conventions")
56
id("otel.publish-conventions")
7+
id("com.github.johnrengelman.shadow")
68
id("me.champeau.jmh") version "0.7.2"
79
id("ru.vyarus.animalsniffer") version "1.7.1"
810
id("com.squareup.wire") version "4.9.3"
@@ -61,6 +63,13 @@ wire {
6163
)
6264
}
6365

66+
tasks.named<ShadowJar>("shadowJar") {
67+
archiveClassifier.set("")
68+
configurations = emptyList() // To avoid embedding any dependencies as we only need to rename some local packages.
69+
relocate("io.opentelemetry.proto", "io.opentelemetry.diskbuffering.proto")
70+
mustRunAfter("jar")
71+
}
72+
6473
// The javadoc from wire's generated classes has errors that make the task that generates the "javadoc" artifact to fail. This
6574
// makes the javadoc task to ignore those generated classes.
6675
tasks.withType(Javadoc::class.java) {

0 commit comments

Comments
 (0)