Skip to content

Commit

Permalink
Shadowing generated proto java sources (#1146)
Browse files Browse the repository at this point in the history
Co-authored-by: Trask Stalnaker <trask.stalnaker@gmail.com>
  • Loading branch information
LikeTheSalad and trask authored Jan 4, 2024
1 parent b0e2797 commit b495ac8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions disk-buffering/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import ru.vyarus.gradle.plugin.animalsniffer.AnimalSniffer

plugins {
id("otel.java-conventions")
id("otel.publish-conventions")
id("com.github.johnrengelman.shadow")
id("me.champeau.jmh") version "0.7.2"
id("ru.vyarus.animalsniffer") version "1.7.1"
id("com.squareup.wire") version "4.9.3"
Expand Down Expand Up @@ -61,6 +63,13 @@ wire {
)
}

tasks.named<ShadowJar>("shadowJar") {
archiveClassifier.set("")
configurations = emptyList() // To avoid embedding any dependencies as we only need to rename some local packages.
relocate("io.opentelemetry.proto", "io.opentelemetry.diskbuffering.proto")
mustRunAfter("jar")
}

// The javadoc from wire's generated classes has errors that make the task that generates the "javadoc" artifact to fail. This
// makes the javadoc task to ignore those generated classes.
tasks.withType(Javadoc::class.java) {
Expand Down

0 comments on commit b495ac8

Please sign in to comment.