Remove unnecessary libs from the javaagent shadowJar (#2566)
* Remove unnecessary libs from the javaagent shadowJar And make it a bit lighter: 36 MB -> 21 MB * Apply code review comments * Remove unnecessary kotlin exclusion
This commit is contained in:
parent
f3bc02f2e7
commit
f3ba2302eb
|
@ -6,7 +6,6 @@ apply plugin: 'muzzle'
|
|||
apply plugin: 'com.github.johnrengelman.shadow'
|
||||
|
||||
ext {
|
||||
packageInAgentBundle = true
|
||||
mavenGroupId = 'io.opentelemetry.javaagent.instrumentation'
|
||||
// Shadow is only for testing, not publishing.
|
||||
noShadowPublish = true
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
ext.skipPublish = true
|
||||
ext {
|
||||
skipPublish = true
|
||||
}
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
ext.skipPublish = true
|
||||
ext {
|
||||
skipPublish = true
|
||||
}
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
ext.skipPublish = true
|
||||
ext {
|
||||
skipPublish = true
|
||||
}
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
ext.skipPublish = true
|
||||
|
||||
ext {
|
||||
skipPublish = true
|
||||
}
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
muzzle {
|
||||
|
|
|
@ -12,7 +12,9 @@ muzzle {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation group: "com.couchbase.client", name: "tracing-opentelemetry", version: "0.3.3"
|
||||
implementation(group: "com.couchbase.client", name: "tracing-opentelemetry", version: "0.3.3") {
|
||||
exclude(group: "com.couchbase.client", module: "core-io")
|
||||
}
|
||||
|
||||
library group: "com.couchbase.client", name: "core-io", version: "2.1.0"
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ class CouchbaseClient31Test extends AgentInstrumentationSpecification {
|
|||
name(~/.*get/)
|
||||
}
|
||||
span(1) {
|
||||
name("dispatch_to_server")
|
||||
name(~/.*dispatch_to_server/)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
ext.skipPublish = true
|
||||
ext {
|
||||
skipPublish = true
|
||||
}
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -24,7 +24,7 @@ subprojects {
|
|||
// Make it so all instrumentation subproject tests can be run with a single command.
|
||||
instr_project.tasks.test.dependsOn(subProj.tasks.test)
|
||||
|
||||
if (subProj.findProperty('packageInAgentBundle')) {
|
||||
if (subProj.name == 'javaagent') {
|
||||
instr_project.dependencies {
|
||||
implementation(project(subProj.getPath()))
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
ext.skipPublish = true
|
||||
ext {
|
||||
skipPublish = true
|
||||
}
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
configurations {
|
||||
|
@ -6,7 +8,7 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
api "javax:javaee-api:7.0"
|
||||
testImplementation "javax:javaee-api:7.0"
|
||||
|
||||
def arquillianVersion = '1.4.0.Final'
|
||||
testImplementation "org.jboss.arquillian.junit:arquillian-junit-container:${arquillianVersion}"
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
ext {
|
||||
skipPublish = true
|
||||
}
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
testInstrumentation(project(':instrumentation:mongo:mongo-3.7:javaagent')) {
|
||||
exclude group: 'org.mongodb', module: 'mongo-java-driver'
|
||||
|
|
|
@ -5,7 +5,6 @@ ext {
|
|||
|
||||
apply from: "$rootDir/gradle/instrumentation.gradle"
|
||||
|
||||
|
||||
dependencies {
|
||||
testInstrumentation project(':instrumentation:servlet:servlet-3.0:javaagent')
|
||||
testInstrumentation project(':instrumentation:servlet:servlet-common:javaagent')
|
||||
|
|
|
@ -28,12 +28,7 @@ dependencies {
|
|||
implementation deps.opentelemetrySdk
|
||||
implementation deps.opentelemetrySdkAutoconfigure
|
||||
implementation deps.opentelemetrySdkMetrics
|
||||
implementation(deps.opentelemetryKotlin) {
|
||||
// opentelemetry-extension-kotlin classes are injected into user classpath
|
||||
// where kotlin core libraries are already present
|
||||
exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib-common'
|
||||
exclude group: 'org.jetbrains.kotlinx', module: 'kotlinx-coroutines-core'
|
||||
}
|
||||
implementation(deps.opentelemetryKotlin)
|
||||
implementation deps.opentelemetryExtAws
|
||||
implementation deps.opentelemetryTraceProps
|
||||
implementation(deps.opentelemetryResources) {
|
||||
|
|
Loading…
Reference in New Issue