build.gradle.kts 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. id("otel.scala-conventions")
  4. }
  5. muzzle {
  6. pass {
  7. coreJdk()
  8. }
  9. }
  10. dependencies {
  11. bootstrap(project(":instrumentation:jdbc:bootstrap"))
  12. compileOnly(
  13. project(
  14. path = ":instrumentation:jdbc:library",
  15. configuration = "shadow",
  16. ),
  17. )
  18. compileOnly("com.google.auto.value:auto-value-annotations")
  19. annotationProcessor("com.google.auto.value:auto-value")
  20. // jdbc unit testing
  21. testLibrary("com.h2database:h2:1.3.169")
  22. // first version jdk 1.6 compatible
  23. testLibrary("org.apache.derby:derby:10.6.1.0")
  24. testLibrary("org.hsqldb:hsqldb:2.0.0")
  25. testLibrary("org.apache.tomcat:tomcat-jdbc:7.0.19")
  26. // tomcat needs this to run
  27. testLibrary("org.apache.tomcat:tomcat-juli:7.0.19")
  28. testLibrary("com.zaxxer:HikariCP:2.4.0")
  29. testLibrary("com.mchange:c3p0:0.9.5")
  30. latestDepTestLibrary("org.apache.derby:derby:10.14.+")
  31. testImplementation(project(":instrumentation:jdbc:testing"))
  32. // these dependencies are for SlickTest
  33. testImplementation("org.scala-lang:scala-library:2.11.12")
  34. testImplementation("com.typesafe.slick:slick_2.11:3.2.0")
  35. testImplementation("com.h2database:h2:1.4.197")
  36. }
  37. sourceSets {
  38. main {
  39. val shadedDep = project(":instrumentation:jdbc:library")
  40. output.dir(
  41. shadedDep.file("build/extracted/shadow-javaagent"),
  42. "builtBy" to ":instrumentation:jdbc:library:extractShadowJarJavaagent",
  43. )
  44. }
  45. }
  46. tasks {
  47. val testSlick by registering(Test::class) {
  48. filter {
  49. includeTestsMatching("SlickTest")
  50. }
  51. include("**/SlickTest.*")
  52. }
  53. test {
  54. filter {
  55. excludeTestsMatching("SlickTest")
  56. }
  57. jvmArgs("-Dotel.instrumentation.jdbc-datasource.enabled=true")
  58. }
  59. check {
  60. dependsOn(testSlick)
  61. }
  62. }