|
| 1 | +plugins { |
| 2 | + id 'application' |
| 3 | + id "com.github.johnrengelman.shadow" version "2.0.1" |
| 4 | +} |
| 5 | + |
| 6 | +description = 'dd-java-agent' |
| 7 | +mainClassName = "com.datadoghq.trace.agent.AnnotationsTracingAgent" |
| 8 | + |
| 9 | +dependencies { |
| 10 | + compile project(':dd-trace') |
| 11 | + compile project(':dd-trace-annotations') |
| 12 | + |
| 13 | + compile group: 'io.opentracing.contrib', name: 'opentracing-agent', version: '0.1.0' |
| 14 | + compile group: 'org.reflections', name: 'reflections', version: '0.9.11' |
| 15 | + |
| 16 | + |
| 17 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-web-servlet-filter', version: '0.0.9') { |
| 18 | + exclude(module: 'jetty-servlet') |
| 19 | + } |
| 20 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-mongo-driver', version: '0.0.2') { |
| 21 | + exclude(module: 'mongodb-driver-async') |
| 22 | + exclude(module: 'mongo-java-driver') |
| 23 | + } |
| 24 | + compile group: 'io.opentracing.contrib', name: 'opentracing-jdbc', version: '0.0.2' |
| 25 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-okhttp3', version: '0.0.5') { |
| 26 | + exclude(module: 'okhttp') |
| 27 | + } |
| 28 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-jms-2', version: '0.0.3') { |
| 29 | + exclude(module: 'javax.jms-api') |
| 30 | + } |
| 31 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-aws-sdk', version: '0.0.2') { |
| 32 | + exclude(module: 'aws-java-sdk') |
| 33 | + } |
| 34 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-cassandra-driver', version: '0.0.2') { |
| 35 | + exclude(module: 'cassandra-driver-core') |
| 36 | + } |
| 37 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-elasticsearch-client', version: '0.0.2') { |
| 38 | + exclude(module: 'transport') |
| 39 | + } |
| 40 | + compile(group: 'io.opentracing.contrib', name: 'opentracing-apache-httpclient', version: '0.0.2') { |
| 41 | + exclude(module: 'httpclient') |
| 42 | + } |
| 43 | + |
| 44 | + testCompile group: 'io.opentracing', name: 'opentracing-mock', version: '0.30.0' |
| 45 | + testCompile group: 'junit', name: 'junit', version: '4.12' |
| 46 | + testCompile group: 'org.assertj', name: 'assertj-core', version: '3.6.2' |
| 47 | + testCompile group: 'org.mockito', name: 'mockito-core', version: '2.7.22' |
| 48 | + compileOnly group: 'org.eclipse.jetty', name: 'jetty-servlet', version: '9.3.6.v20151106' |
| 49 | + compileOnly group: 'org.apache.tomcat.embed', name: 'tomcat-embed-core', version: '9.0.0.M1' |
| 50 | + compileOnly group: 'org.mongodb', name: 'mongo-java-driver', version: '3.4.2' |
| 51 | + compileOnly group: 'org.mongodb', name: 'mongodb-driver-async', version: '3.4.2' |
| 52 | + compileOnly group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.6.0' |
| 53 | + compileOnly group: 'javax.jms', name: 'javax.jms-api', version: '2.0.1' |
| 54 | + compileOnly group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.11.119' |
| 55 | + compileOnly group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: '3.2.0' |
| 56 | + compileOnly group: 'org.elasticsearch.client', name: 'transport', version: '5.4.1' |
| 57 | + compileOnly group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3' |
| 58 | +} |
| 59 | + |
| 60 | +jar { |
| 61 | + manifest { |
| 62 | + attributes( |
| 63 | + // I don't think we want to define this since we can't really load after startup: |
| 64 | + //"Agent-Class": "com.datadoghq.trace.agent.AnnotationsTracingAgent", |
| 65 | + "Premain-Class": "com.datadoghq.trace.agent.AnnotationsTracingAgent", |
| 66 | + "Can-Redefine-Classes": true, |
| 67 | + "Can-Retransform-Classes": true, |
| 68 | + // It is dangerous putting everything on the bootstrap classpath, |
| 69 | + // but kept for consistency with previous versions. |
| 70 | + "Boot-Class-Path": "./${jar.archiveName}.jar" |
| 71 | + ) |
| 72 | + } |
| 73 | +} |
| 74 | + |
| 75 | +shadowJar { |
| 76 | + append 'otarules.btm' |
| 77 | + |
| 78 | + classifier 'shadow' |
| 79 | + |
| 80 | +// mergeServiceFiles() |
| 81 | + |
| 82 | + relocate('', 'dd.deps.') { |
| 83 | + exclude '%ant[META-INF/**/*]' |
| 84 | + } |
| 85 | +} |
0 commit comments