diff options
| author | Stefan Schmidt <stschmidt@google.com> | 2017-06-30 14:55:17 +0200 |
|---|---|---|
| committer | Stefan Schmidt <stschmidt@google.com> | 2017-06-30 14:55:17 +0200 |
| commit | 27df8d6c6690789c025ece971a11a4b867395782 (patch) | |
| tree | d4de78cc0020d837607ddd3d7dadc0d1ec97433e /contrib | |
| parent | 1989720ea57fc40a4a2aaedcfb09fe988e9b186d (diff) | |
| download | platform_external_opencensus-java-27df8d6c6690789c025ece971a11a4b867395782.tar.gz platform_external_opencensus-java-27df8d6c6690789c025ece971a11a4b867395782.tar.bz2 platform_external_opencensus-java-27df8d6c6690789c025ece971a11a4b867395782.zip | |
Add a dependency on Guava and relocate and bundle it properly.
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/agent/build.gradle | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/contrib/agent/build.gradle b/contrib/agent/build.gradle index 72478a07..41b4b0b1 100644 --- a/contrib/agent/build.gradle +++ b/contrib/agent/build.gradle @@ -22,6 +22,7 @@ def agentBootstrapClasses = agentBootstrapPackageDir + '**' def agentRepackaged = "${agentPackage}.deps" dependencies { + compile libraries.guava compile group: 'net.bytebuddy', name: 'byte-buddy', version: '1.7.1' signature 'org.codehaus.mojo.signature:java17:+@signature' @@ -62,6 +63,7 @@ shadowJar { // Include only the following dependencies (excluding transitive dependencies). dependencies { include(dependency('net.bytebuddy:byte-buddy')) + include(dependency(libraries.guava)) } // Exclude cruft which still snuck in. @@ -70,7 +72,11 @@ shadowJar { // Relocate third party packages to avoid any conflicts of the agent's classes with the app's // classes, which are loaded by the same classloader (the system classloader). + // Byte Buddy: relocate 'net.bytebuddy', agentRepackaged + '.bytebuddy' + // Guava: + relocate 'com.google.common', agentRepackaged + '.guava' + relocate 'com.google.thirdparty.publicsuffix', agentRepackaged + '.publicsuffix' doLast { def agentPackageDir = agentPackage.replace('.', '/') + '/' @@ -103,3 +109,5 @@ shadowJar { } jar.finalizedBy shadowJar + +// TODO(stschmidt): Proguard-shrink the agent JAR. |
