Skip to content
This repository was archived by the owner on Jul 1, 2022. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions jaeger-client/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
apply plugin: 'com.github.johnrengelman.shadow'

description = 'Convenience module to be used by instrumented applications'

dependencies {
Expand All @@ -7,3 +9,26 @@ dependencies {

testCompile group: 'junit', name: 'junit', version: junitVersion
}

/* Shaded the same libraries as jaeger-thrift,
* for a standalone fat jar. */
shadowJar {
relocate 'com.google.gson' , 'io.jaegertracing.vendor.com.google.gson'
relocate 'com.twitter' , 'io.jaegertracing.vendor.com.twitter'
relocate 'okhttp' , 'io.jaegertracing.vendor.okhttp'
relocate 'okio' , 'io.jaegertracing.vendor.okio'
relocate 'org.apache' , 'io.jaegertracing.vendor.org.apache'
classifier 'all'
dependencies {
exclude(dependency('org.projectlombok:lombok'))
exclude(dependency('org.codehaus.mojo:animal-sniffer-annotations'))
}
}

artifacts {
archives(shadowJar.archivePath) {
builtBy shadowJar
}
}

tasks.check.dependsOn tasks.shadowJar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This wasn't required in the thrift usecase - was the shadowJar task not being triggered?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shadowJar is only being triggered in the thrift case when jaeger-crossdock is being built. Based on what you wrote, it sounds like we should do the same here? :)

Copy link
Contributor

@objectiser objectiser Mar 12, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure it should be dependent on jaeger-crossdock build - ideally it should just be built when the non-shaded artifact is being built.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, then this line should stay, as it builds the shaded artifact right after the non-shaded one was built.