build.gradle.kts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. plugins {
  2. id("otel.library-instrumentation")
  3. }
  4. otelJava {
  5. minJavaVersionSupported.set(JavaVersion.VERSION_17)
  6. }
  7. dependencies {
  8. implementation(project(":instrumentation:runtime-metrics:runtime-metrics-java8:library"))
  9. testImplementation("io.github.netmikey.logunit:logunit-jul:1.1.3")
  10. }
  11. tasks.create("generateDocs", JavaExec::class) {
  12. group = "build"
  13. description = "Generate table for README.md"
  14. classpath = sourceSets.test.get().runtimeClasspath
  15. mainClass.set("io.opentelemetry.instrumentation.runtimemetrics.java17.GenerateDocs")
  16. systemProperties.set("jfr.readme.path", project.projectDir.toString() + "/README.md")
  17. }
  18. tasks {
  19. val testG1 by registering(Test::class) {
  20. filter {
  21. includeTestsMatching("*G1GcMemoryMetricTest*")
  22. }
  23. include("**/*G1GcMemoryMetricTest.*")
  24. jvmArgs("-XX:+UseG1GC")
  25. }
  26. val testPS by registering(Test::class) {
  27. filter {
  28. includeTestsMatching("*PsGcMemoryMetricTest*")
  29. }
  30. include("**/*PsGcMemoryMetricTest.*")
  31. jvmArgs("-XX:+UseParallelGC")
  32. }
  33. val testSerial by registering(Test::class) {
  34. filter {
  35. includeTestsMatching("*SerialGcMemoryMetricTest*")
  36. }
  37. include("**/*SerialGcMemoryMetricTest.*")
  38. jvmArgs("-XX:+UseSerialGC")
  39. }
  40. test {
  41. filter {
  42. excludeTestsMatching("*G1GcMemoryMetricTest")
  43. excludeTestsMatching("*SerialGcMemoryMetricTest")
  44. excludeTestsMatching("*PsGcMemoryMetricTest")
  45. }
  46. dependsOn(testG1)
  47. dependsOn(testPS)
  48. dependsOn(testSerial)
  49. }
  50. }