Add gradle plugin for SDK extensions (#6558)

This commit is contained in:
Mateusz Rzeszutek 2022-09-09 00:06:32 +02:00 committed by GitHub
parent 6d22758ac2
commit f63eae5ad0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,14 @@
// SDK extensions are very similar to library instrumentations, they can be used without the javaagent
// but since they depend on the SDK they must be loaded by the agent CL in the javaagent
plugins {
id("io.opentelemetry.instrumentation.library-instrumentation")
id("otel.jacoco-conventions")
id("otel.java-conventions")
id("otel.publish-conventions")
}
extra["mavenGroupId"] = "io.opentelemetry.instrumentation"
base.archivesName.set(projectDir.parentFile.name)

View File

@ -1,5 +1,5 @@
plugins {
id("otel.library-instrumentation")
id("otel.sdk-extension")
}
dependencies {

View File

@ -108,6 +108,12 @@ project(":instrumentation").subprojects {
add(javaagentLibs.name, project(subProj.path))
}
}
plugins.withId("otel.sdk-extension") {
javaagentDependencies.run {
add(javaagentLibs.name, project(subProj.path))
}
}
}
tasks {