build.gradle.kts 788 B

123456789101112131415161718192021
  1. plugins {
  2. id("otel.javaagent-bootstrap")
  3. }
  4. /*
  5. JDBC instrumentation uses VirtualField<Connection, DbInfo>. Add DbInfo, that is used as the value of
  6. VirtualField, to boot loader. We do this because when JDBC instrumentation is started in multiple
  7. class loaders in the same hierarchy, each would define their own version of DbInfo. It is possible
  8. that the value read from virtual field would be from the wrong class loader and could produce a
  9. ClassCastException. Having a single copy of DbInfo that is in boot loader avoids this issue.
  10. */
  11. sourceSets {
  12. main {
  13. val shadedDep = project(":instrumentation:jdbc:library")
  14. output.dir(
  15. shadedDep.file("build/extracted/shadow-bootstrap"),
  16. "builtBy" to ":instrumentation:jdbc:library:extractShadowJarBootstrap",
  17. )
  18. }
  19. }