build.gradle.kts 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. plugins {
  2. id("otel.javaagent-instrumentation")
  3. id("org.unbroken-dome.test-sets")
  4. }
  5. muzzle {
  6. pass {
  7. group.set("org.hibernate")
  8. module.set("hibernate-core")
  9. versions.set("[4.0.0.Final,)")
  10. assertInverse.set(true)
  11. }
  12. }
  13. testSets {
  14. create("version5Test") {
  15. dirName = "test"
  16. }
  17. create("latestDepTest") {
  18. dirName = "test"
  19. }
  20. }
  21. tasks {
  22. val version5Test by existing(Test::class)
  23. test {
  24. dependsOn(version5Test)
  25. }
  26. }
  27. dependencies {
  28. compileOnly("org.hibernate:hibernate-core:4.0.0.Final")
  29. implementation(project(":instrumentation:hibernate:hibernate-common:javaagent"))
  30. testInstrumentation(project(":instrumentation:jdbc:javaagent"))
  31. // Added to ensure cross compatibility:
  32. testInstrumentation(project(":instrumentation:hibernate:hibernate-3.3:javaagent"))
  33. testInstrumentation(project(":instrumentation:hibernate:hibernate-procedure-call-4.3:javaagent"))
  34. testImplementation("com.h2database:h2:1.4.197")
  35. testImplementation("javax.xml.bind:jaxb-api:2.2.11")
  36. testImplementation("com.sun.xml.bind:jaxb-core:2.2.11")
  37. testImplementation("com.sun.xml.bind:jaxb-impl:2.2.11")
  38. testImplementation("javax.activation:activation:1.1.1")
  39. testImplementation("org.hsqldb:hsqldb:2.0.0")
  40. // First version to work with Java 14
  41. testImplementation("org.springframework.data:spring-data-jpa:1.8.0.RELEASE")
  42. testImplementation("org.hibernate:hibernate-core:4.0.0.Final")
  43. testImplementation("org.hibernate:hibernate-entitymanager:4.0.0.Final")
  44. add("version5TestImplementation", "org.hibernate:hibernate-core:5.0.0.Final")
  45. add("version5TestImplementation", "org.hibernate:hibernate-entitymanager:5.0.0.Final")
  46. add("version5TestImplementation", "org.springframework.data:spring-data-jpa:2.3.0.RELEASE")
  47. add("latestDepTestImplementation", "org.hibernate:hibernate-core:5.+")
  48. add("latestDepTestImplementation", "org.hibernate:hibernate-entitymanager:5.+")
  49. add("latestDepTestImplementation", "org.springframework.data:spring-data-jpa:(2.4.0,)")
  50. }
  51. tasks.withType<Test>().configureEach {
  52. // TODO run tests both with and without experimental span attributes
  53. jvmArgs("-Dotel.instrumentation.hibernate.experimental-span-attributes=true")
  54. }